Add a drbackupkey task
This will be required to migrate Dist Git to ansible.
This commit is contained in:
parent
f60221e2aa
commit
4392ef9f6c
1 changed files with 13 additions and 0 deletions
13
tasks/drbackupkey.yml
Normal file
13
tasks/drbackupkey.yml
Normal file
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
- name: ensure the user exists
|
||||
group: name=drbackup state=present
|
||||
user: name=drbackup comment="DR Backup User" group=drbackup shell=/bin/bash home=/var/lib/drbackup
|
||||
file: dest=/var/lib/drbackup/ state=directory owner=drbackup group=drbackup mode=0700
|
||||
|
||||
- name: install the authorized SSH key
|
||||
file: dest=/var/lib/drbackup/.ssh/ state=directory owner=drbackup group=drbackup mode=0700
|
||||
copy: src={{private}}/backup.pub dest=/var/lib/drbackup/.ssh/authorized_keys owner=drbackup group=drbackup mode=0600
|
||||
|
||||
- name: deploy the confine-ssh script
|
||||
tasks:
|
||||
- include: "{{tasks}}/confine-ssh.yml"
|
Loading…
Add table
Add a link
Reference in a new issue