Move the drbackup homedir to /home
This is one way to make sure we adhere to: uid < 1000 || homedir in /home
This commit is contained in:
parent
b79f19e2e7
commit
7c787c2989
1 changed files with 5 additions and 4 deletions
|
@ -2,17 +2,18 @@
|
||||||
- name: ensure the drbackup group exists
|
- name: ensure the drbackup group exists
|
||||||
group: name=drbackup state=present
|
group: name=drbackup state=present
|
||||||
|
|
||||||
|
# Do not move the homedir outside of /home, since either this or uid < 1000 is required
|
||||||
- name: ensure the drbackup user exists
|
- name: ensure the drbackup user exists
|
||||||
user: name=drbackup comment="DR Backup User" group=drbackup shell=/bin/bash home=/var/lib/drbackup
|
user: name=drbackup comment="DR Backup User" group=drbackup shell=/bin/bash home=/home/drbackup
|
||||||
|
|
||||||
- name: Make sure the drbackup homedir exists
|
- name: Make sure the drbackup homedir exists
|
||||||
file: dest=/var/lib/drbackup/ state=directory owner=drbackup group=drbackup mode=0700
|
file: dest=/home/drbackup/ state=directory owner=drbackup group=drbackup mode=0700
|
||||||
|
|
||||||
- name: install the authorized SSH key
|
- name: install the authorized SSH key
|
||||||
file: dest=/var/lib/drbackup/.ssh/ state=directory owner=drbackup group=drbackup mode=0700
|
file: dest=/home/drbackup/.ssh/ state=directory owner=drbackup group=drbackup mode=0700
|
||||||
|
|
||||||
- name: install the backup ssh keys
|
- name: install the backup ssh keys
|
||||||
copy: src={{private}}/files/backup.pub dest=/var/lib/drbackup/.ssh/authorized_keys owner=drbackup group=drbackup mode=0600
|
copy: src={{private}}/files/backup.pub dest=/home/drbackup/.ssh/authorized_keys owner=drbackup group=drbackup mode=0600
|
||||||
|
|
||||||
#
|
#
|
||||||
# deploy the confine-ssh script
|
# deploy the confine-ssh script
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue