roles: Fix use of ansible.builtin.fail free-form message.

ansible-lint warns to avoid using free-form when calling module actions
and ansible-freeipa roles used this form with 'ansible.builtin.fail'.
This commit is contained in:
Rafael Guterres Jeffman
2023-01-03 16:56:59 -03:00
parent 9a32359a5d
commit 6b7633976c
8 changed files with 49 additions and 25 deletions

View File

@@ -1,6 +1,7 @@
---
- name: Fail on invalid ipabackup_name
ansible.builtin.fail: msg="ipabackup_name {{ ipabackup_name }} is not valid"
ansible.builtin.fail:
msg: "ipabackup_name {{ ipabackup_name }} is not valid"
when: ipabackup_name is not defined or
ipabackup_name | length < 1 or
(ipabackup_name.find("ipa-full-") == -1 and
@@ -30,7 +31,8 @@
become: no
- name: Fail on missing backup to copy
ansible.builtin.fail: msg="Unable to find backup {{ ipabackup_name }}"
ansible.builtin.fail:
msg: "Unable to find backup {{ ipabackup_name }}"
when: result_backup_stat.stat.isdir is not defined
- name: Copy backup files to server for "{{ ipabackup_item }}"