Add a drbackupkey task

This will be required to migrate Dist Git to ansible.
This commit is contained in:
Mathieu Bridon 2014-07-17 18:25:32 +02:00 committed by Kevin Fenzi
parent f60221e2aa
commit 4392ef9f6c

13
tasks/drbackupkey.yml Normal file
View 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"