mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-08-03 05:14:41 +00:00
ipabackup: Fix undefined vars for conditions in shell tasks without else
The use of conditions in shell tasks without else clause is failing on some systems with an undefined variable error.
This commit is contained in:
@@ -4,13 +4,13 @@
|
||||
- name: Create backup
|
||||
shell: >
|
||||
ipa-backup
|
||||
{{ "--gpg" if ipabackup_gpg | bool }}
|
||||
{{ "--gpg-keyring="+ipabackup_gpg_keyring if ipabackup_gpg_keyring is defined }}
|
||||
{{ "--data" if ipabackup_data | bool }}
|
||||
{{ "--logs" if ipabackup_logs | bool }}
|
||||
{{ "--online" if ipabackup_online | bool }}
|
||||
{{ "--disable-role-check" if ipabackup_disable_role_check | bool }}
|
||||
{{ "--log-file="+ipabackup_log_file if ipabackup_log_file is defined }}
|
||||
{{ "--gpg" if ipabackup_gpg | bool else "" }}
|
||||
{{ "--gpg-keyring="+ipabackup_gpg_keyring if ipabackup_gpg_keyring is defined else "" }}
|
||||
{{ "--data" if ipabackup_data | bool else "" }}
|
||||
{{ "--logs" if ipabackup_logs | bool else "" }}
|
||||
{{ "--online" if ipabackup_online | bool else "" }}
|
||||
{{ "--disable-role-check" if ipabackup_disable_role_check | bool else "" }}
|
||||
{{ "--log-file="+ipabackup_log_file if ipabackup_log_file is defined else "" }}
|
||||
register: result_ipabackup
|
||||
|
||||
- block:
|
||||
|
||||
Reference in New Issue
Block a user