ansible-borgbackup/tasks/borg-server.yml

31 lines
716 B
YAML
Raw Normal View History

2017-09-07 18:35:01 +00:00
---
- name: server | install borg backup
get_url:
dest: "/usr/local/bin/borg"
checksum: "{{ borg_checksum }}"
owner: "root"
group: "root"
mode: "0755"
url: "{{ borg_download_url }}"
delegate_to: "{{ item.fqdn }}"
with_items: "{{ backupservers }}"
when: item.type == 'normal'
- name: server | create user
user:
name: "{{ item.user }}"
shell: "/bin/bash"
home: "{{ item.home }}"
createhome: "yes"
delegate_to: "{{ item.fqdn }}"
with_items: "{{ backupservers }}"
when: item.type == 'normal'
- name: server | create directories
file:
path: "{{ item.pool }}"
state: "directory"
owner: "{{ item.user }}"
group: "{{ item.user }}"
mode: "0770"