2014-07-17 18:25:32 +02:00
|
|
|
---
|
2014-08-26 19:12:53 +00:00
|
|
|
- name: ensure the drbackup group exists
|
2014-07-17 18:25:32 +02:00
|
|
|
group: name=drbackup state=present
|
2014-08-26 19:12:53 +00:00
|
|
|
|
2015-03-12 13:40:44 +00:00
|
|
|
# Do not move the homedir outside of /home, since either this or uid < 1000 is required
|
2014-08-26 19:12:53 +00:00
|
|
|
- name: ensure the drbackup user exists
|
2015-03-12 13:40:44 +00:00
|
|
|
user: name=drbackup comment="DR Backup User" group=drbackup shell=/bin/bash home=/home/drbackup
|
2014-08-26 19:13:49 +00:00
|
|
|
|
|
|
|
- name: Make sure the drbackup homedir exists
|
2015-03-12 13:40:44 +00:00
|
|
|
file: dest=/home/drbackup/ state=directory owner=drbackup group=drbackup mode=0700
|
2014-07-17 18:25:32 +02:00
|
|
|
|
|
|
|
- name: install the authorized SSH key
|
2015-03-12 13:40:44 +00:00
|
|
|
file: dest=/home/drbackup/.ssh/ state=directory owner=drbackup group=drbackup mode=0700
|
2014-08-26 19:13:49 +00:00
|
|
|
|
|
|
|
- name: install the backup ssh keys
|
2015-03-12 13:40:44 +00:00
|
|
|
copy: src={{private}}/files/backup.pub dest=/home/drbackup/.ssh/authorized_keys owner=drbackup group=drbackup mode=0600
|
2014-07-17 18:25:32 +02:00
|
|
|
|
2014-08-26 19:14:46 +00:00
|
|
|
#
|
|
|
|
# deploy the confine-ssh script
|
|
|
|
#
|
2014-08-26 19:15:19 +00:00
|
|
|
- include: "{{tasks}}/confine_ssh.yml"
|