mirror of
https://github.com/roles-ansible/ansible_role_gitea.git
synced 2024-08-16 11:39:50 +02:00
Fixing deprecation warning
ANsible comes with the error: ```bash [DEPRECATION WARNING]: evaluating gitea_fail2ban_enabled as a bare variable, this behaviour will go away and you might need to add |bool to the expression in the future. Also see CONDITIONAL_BARE_VARS configuration toggle.. This feature will be removed in version 2.12. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. ``` appending ``|bool`` after a boolean variable will resolve the issue.
This commit is contained in:
parent
0ccf9b334d
commit
5e971278c3
1 changed files with 3 additions and 3 deletions
|
@ -4,7 +4,7 @@
|
|||
register: gitea_active_version
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
when: gitea_version_check
|
||||
when: gitea_version_check|bool
|
||||
|
||||
- name: "Download the binary"
|
||||
get_url:
|
||||
|
@ -15,7 +15,7 @@
|
|||
mode: 0755
|
||||
force: true
|
||||
notify: "Restart gitea"
|
||||
when: (not gitea_version_check) or (gitea_active_version.stdout != gitea_version)
|
||||
when: (not gitea_version_check|bool) or (gitea_active_version.stdout != gitea_version)
|
||||
|
||||
- include: create_user.yml
|
||||
|
||||
|
@ -51,4 +51,4 @@
|
|||
when: ansible_service_mgr == "systemd"
|
||||
|
||||
- include: fail2ban.yml
|
||||
when: gitea_fail2ban_enabled
|
||||
when: gitea_fail2ban_enabled|bool
|
||||
|
|
Loading…
Reference in a new issue