mirror of
				https://github.com/kevinveenbirkenbach/computer-playbook.git
				synced 2025-10-31 02:10:05 +00:00 
			
		
		
		
	Implemented deletion of not fully pulled backups
This commit is contained in:
		
							
								
								
									
										37
									
								
								roles/server_native-backups-provider-user/tasks/main.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										37
									
								
								roles/server_native-backups-provider-user/tasks/main.yml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,37 @@ | ||||
| - name: create backup user | ||||
|   user: | ||||
|     name: backup | ||||
|     create_home: yes | ||||
|  | ||||
| - name: create .ssh directory | ||||
|   file: | ||||
|     path: /home/backup/.ssh | ||||
|     state: directory | ||||
|     owner: backup | ||||
|     group: backup | ||||
|     mode: '0700' | ||||
|  | ||||
| - name: create /home/backup/.ssh/authorized_keys | ||||
|   template: | ||||
|     src: "authorized_keys.j2" | ||||
|     dest: /home/backup/.ssh/authorized_keys | ||||
|     owner: backup | ||||
|     group: backup | ||||
|     mode: '0644' | ||||
|  | ||||
| - name: create /home/backup/ssh-wrapper.sh | ||||
|   copy: | ||||
|     src: "ssh-wrapper.sh" | ||||
|     dest: /home/backup/ssh-wrapper.sh | ||||
|     owner: backup | ||||
|     group: backup | ||||
|     mode: '0700' | ||||
|  | ||||
| - name: grant backup sudo rights | ||||
|   copy: | ||||
|     src: "backup" | ||||
|     dest: /etc/sudoers.d/backup | ||||
|     mode: '0644' | ||||
|     owner: root | ||||
|     group: root | ||||
|   notify: sshd restart | ||||
		Reference in New Issue
	
	Block a user