ansible/tasks/drbackupkey.yml

22 lines
806 B
YAML
Raw Normal View History

---
2014-08-26 19:12:53 +00:00
- name: ensure the drbackup group exists
group: name=drbackup state=present
2014-08-26 19:12:53 +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
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
file: dest=/home/drbackup/ state=directory owner=drbackup group=drbackup mode=0700
- name: install the authorized SSH key
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
copy: src={{private}}/files/backup.pub dest=/home/drbackup/.ssh/authorized_keys owner=drbackup group=drbackup mode=0600
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"