diff --git a/tasks/main.yml b/tasks/main.yml index fa8fc50..d53bc5c 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -10,3 +10,8 @@ - backup_duplicity with_items: - "{{ backup_services }}" + +- name: tools + include_tasks: "tools.yml" + tags: + - backup_duplicity diff --git a/tasks/tools.yml b/tasks/tools.yml new file mode 100644 index 0000000..0274705 --- /dev/null +++ b/tasks/tools.yml @@ -0,0 +1,8 @@ +--- +- name: backup | add command aliases + template: + src: profile-backup.sh.j2 + dest: /etc/profile.d/backup.sh + owner: root + group: root + mode: 0640 diff --git a/templates/profile-backup.sh.j2 b/templates/profile-backup.sh.j2 new file mode 100644 index 0000000..0d1a69a --- /dev/null +++ b/templates/profile-backup.sh.j2 @@ -0,0 +1,3 @@ +{% if 'duplicity' in backup_services %} +alias duplicityls='source /etc/duplicity/duplicity.cnf && duplicity collection-status "{{ duplicity_s3_path }}"' +{% endif %}