|
|
- ---
- - name: 'install borgbackup'
- apt:
- pkg: 'borgbackup'
- state: 'latest'
- update_cache: true
- cache_valid_time: 3600
-
- - name: 'create backup group'
- group:
- name: 'backup'
- state: 'present'
-
- - name: 'create backup user'
- user:
- name: 'backup'
- shell: '/bin/bash'
- home: '/home/backup'
- createhome: true
- group: 'backup'
- state: 'present'
-
- - name: 'create home folder'
- file:
- path: '/home/backup/repos'
- owner: 'backup'
- group: 'backup'
- mode: '0700'
- state: 'directory'
-
- - name: 'create .ssh folder'
- file:
- path: '/home/backup/repos'
- owner: 'backup'
- group: 'backup'
- mode: '0700'
- state: 'directory'
-
- - name: 'create repos folder'
- file:
- path: '/home/backup/repos'
- owner: 'backup'
- group: 'backup'
- mode: '0700'
- state: 'directory'
- ...
|