From af39ee0ec26618f3f81001e9be5e2351570cc52e Mon Sep 17 00:00:00 2001 From: Matthias Leutenegger Date: Wed, 14 Aug 2019 16:02:02 +0200 Subject: [PATCH] Adds distribution specific setup --- tasks/configure.yml | 13 ------------- tasks/distribution/Linux.yml | 16 ++++++++++++++++ tasks/distribution/Windows.yml | 6 ++++++ tasks/distribution/defaults.yml | 6 ++++++ 4 files changed, 28 insertions(+), 13 deletions(-) create mode 100644 tasks/distribution/Linux.yml create mode 100644 tasks/distribution/Windows.yml create mode 100644 tasks/distribution/defaults.yml diff --git a/tasks/configure.yml b/tasks/configure.yml index eb71d6e..f2a9cd5 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -15,16 +15,3 @@ - item.value.init is defined - 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 \ No newline at end of file diff --git a/tasks/distribution/Linux.yml b/tasks/distribution/Linux.yml new file mode 100644 index 0000000..87fde0f --- /dev/null +++ b/tasks/distribution/Linux.yml @@ -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 \ No newline at end of file diff --git a/tasks/distribution/Windows.yml b/tasks/distribution/Windows.yml new file mode 100644 index 0000000..e7bfdb1 --- /dev/null +++ b/tasks/distribution/Windows.yml @@ -0,0 +1,6 @@ +--- +# tasks file for skeleton + +- name: Message + debug: + msg: 'Your {{ ansible_system }} is not yet supported' \ No newline at end of file diff --git a/tasks/distribution/defaults.yml b/tasks/distribution/defaults.yml new file mode 100644 index 0000000..8eb12ce --- /dev/null +++ b/tasks/distribution/defaults.yml @@ -0,0 +1,6 @@ +--- +# tasks file for skeleton + +- name: Message + debug: + msg: 'Your {{ ansible_system }} is not supported'