Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add variable for cron file name #37

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ The role variables and default values.
backup_enabled: yes # Enable the role
backup_remove: no # Set yes for uninstall the role from target system
backup_cron: yes # Setup cron tasks for backup
backup_cron_filename: backup # The cron file name for backup tasks. Use it for multiple backup configs on the same server

backup_user: root # Run backups as user
backup_group: "{{backup_user}}"
Expand Down
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
backup_enabled: yes # Enable the role
backup_remove: no # Set yes for uninstall the role from target system
backup_cron: yes # Setup cron tasks for backup
backup_cron_filename: backup # The cron file name for backup tasks. Use it for multiple backup configs on the same server

backup_user: root # Run backups as user
backup_group: "{{backup_user}}"
Expand Down
2 changes: 1 addition & 1 deletion tasks/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
with_items: "{{backup_profiles}}"

- name: backup-configure | Setup cron
template: src=cron.j2 dest=/etc/cron.d/backup owner=root group=root mode=0644
template: src=cron.j2 dest=/etc/cron.d/{{backup_cron_filename}} owner=root group=root mode=0644
when: backup_cron

- name: backup-configure | Create log files
Expand Down