ansible-borgbackup/tasks/borg-server.yml

21 lines
505 B
YAML
Raw Normal View History

2017-09-07 18:35:01 +00:00
---
- name: server | create user
user:
name: "{{ item.user }}"
shell: "/bin/bash"
home: "{{ item.home }}"
createhome: "yes"
delegate_to: "{{ item.fqdn }}"
2017-10-01 17:51:38 +00:00
with_items: "{{ borgbackup_servers }}"
2017-09-07 18:35:01 +00:00
when: item.type == 'normal'
- name: server | create directories
file:
2017-09-12 18:50:57 +00:00
path: "{{ item.home}}{{ item.pool }}"
2017-09-07 18:35:01 +00:00
state: "directory"
owner: "{{ item.user }}"
group: "{{ item.user }}"
mode: "0770"
2017-11-12 14:02:50 +00:00
delegate_to: "{{ item.fqdn }}"
2017-10-01 17:51:38 +00:00
with_items: "{{ borgbackup_servers }}"