mirror of
https://github.com/roles-ansible/ansible_role_restic.git
synced 2024-12-11 23:41:32 +01:00
Adds distribution specific setup
This commit is contained in:
parent
6721b67d46
commit
af39ee0ec2
4 changed files with 28 additions and 13 deletions
|
@ -15,16 +15,3 @@
|
||||||
- item.value.init is defined
|
- item.value.init is defined
|
||||||
- item.value.init == true
|
- item.value.init == true
|
||||||
|
|
||||||
- name: Create backup script
|
|
||||||
template:
|
|
||||||
src: restic_script.j2
|
|
||||||
dest: '{{ restic_script_dir }}/backup-{{ item.name }}.sh'
|
|
||||||
mode: '0700'
|
|
||||||
owner: '{{ restic_dir_owner }}'
|
|
||||||
group: '{{ restic_dir_group }}'
|
|
||||||
no_log: True
|
|
||||||
with_items: '{{ restic_backups }}'
|
|
||||||
when:
|
|
||||||
- item.name is defined
|
|
||||||
- item.src is defined or item.stdin is defined and item.stdin == true and item.stdin_cmd is defined
|
|
||||||
- item.repo in restic_repos
|
|
16
tasks/distribution/Linux.yml
Normal file
16
tasks/distribution/Linux.yml
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
---
|
||||||
|
# tasks file for skeleton
|
||||||
|
|
||||||
|
- name: Create backup script
|
||||||
|
template:
|
||||||
|
src: restic_script.j2
|
||||||
|
dest: '{{ restic_script_dir }}/backup-{{ item.name }}.sh'
|
||||||
|
mode: '0700'
|
||||||
|
owner: '{{ restic_dir_owner }}'
|
||||||
|
group: '{{ restic_dir_group }}'
|
||||||
|
no_log: True
|
||||||
|
with_items: '{{ restic_backups }}'
|
||||||
|
when:
|
||||||
|
- item.name is defined
|
||||||
|
- item.src is defined or item.stdin is defined and item.stdin == true and item.stdin_cmd is defined
|
||||||
|
- item.repo in restic_repos
|
6
tasks/distribution/Windows.yml
Normal file
6
tasks/distribution/Windows.yml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
# tasks file for skeleton
|
||||||
|
|
||||||
|
- name: Message
|
||||||
|
debug:
|
||||||
|
msg: 'Your {{ ansible_system }} is not yet supported'
|
6
tasks/distribution/defaults.yml
Normal file
6
tasks/distribution/defaults.yml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
# tasks file for skeleton
|
||||||
|
|
||||||
|
- name: Message
|
||||||
|
debug:
|
||||||
|
msg: 'Your {{ ansible_system }} is not supported'
|
Loading…
Reference in a new issue