ansible-borgbackup/molecule/generic_files/tests/test_server.yml
2018-08-30 23:34:04 +02:00

29 lines
704 B
YAML

# Molecule managed
---
file:
{% for item in borgbackup_servers %}
{% if item.fqdn == inventory_hostname %}
{{ item.home }}:
exists: true
owner: "{{ item.user }}"
group: "{{ item.user }}"
{% for host in groups.all|difference(groups.borgbackup_servers) %}
{{ item.home }}/repos/{{ host }}:
exists: true
{% endfor %}
{% endif %}
{% endfor %}
{% for item in borgbackup_servers %}
{% if item.fqdn == inventory_hostname %}
{{ item.home }}/.ssh/authorized_keys:
exists: true
owner: "{{ item.user }}"
group: "{{ item.user }}"
contains:
{% for host in groups.all|difference(groups.borgbackup_servers) %}
- "{{ host }};borg serve"
{% endfor %}
{% endif %}
{% endfor %}