Changeset - 9f0f315631e4
[Not reviewed]
0 5 0
Branko Majic (branko) - 4 years ago 2020-01-06 00:02:29
branko@majic.rs
MAR-148: Fixing linting errors:

- Do not compare against booleans when value is already boolean in
"when" conditions.
- Do not compare variables to empty strings in "when" conditions. This
change currently works only for complex variables (stuff can break
badly in case of simple variables in current default Ansible
configuration).
5 files changed with 7 insertions and 7 deletions:
0 comments (0 inline, 0 general)
roles/backup_server/tasks/main.yml
Show inline comments
 
@@ -165,6 +165,6 @@
 

	
 
- name: Explicitly run all handlers
 
  include: ../handlers/main.yml
 
  when: "run_handlers | default(False) | bool() == True"
 
  when: "run_handlers | default(False) | bool()"
 
  tags:
 
    - handlers
roles/mail_forwarder/tasks/main.yml
Show inline comments
 
@@ -57,7 +57,7 @@
 
- name: Enable Postfix service on boot (workaround for systemctl broken handling of SysV)
 
  command: "rcconf -on postfix"
 
  register: result
 
  changed_when: result.stderr == ""
 
  changed_when: not result.stderr
 

	
 
- name: Enable postfix service
 
  service:
roles/mail_server/tasks/main.yml
Show inline comments
 
@@ -254,7 +254,7 @@
 
    - postfix
 
    - dovecot
 
  register: result
 
  changed_when: result.stderr == ""
 
  changed_when: not result.stderr
 

	
 
- name: Enable ClamAV database update service (freshclam)
 
  service:
 
@@ -305,6 +305,6 @@
 

	
 
- name: Explicitly run all handlers
 
  include: ../handlers/main.yml
 
  when: "run_handlers | default(False) | bool() == True"
 
  when: "run_handlers | default(False) | bool()"
 
  tags:
 
    - handlers
roles/php_website/tasks/main.yml
Show inline comments
 
@@ -129,6 +129,6 @@
 

	
 
- name: Explicitly run all handlers
 
  include: ../handlers/main.yml
 
  when: "run_handlers | default(False) | bool() == True"
 
  when: "run_handlers | default(False) | bool()"
 
  tags:
 
    - handlers
roles/wsgi_website/tasks/main.yml
Show inline comments
 
@@ -315,7 +315,7 @@
 
    (deploy_systemd_socket_configuration is defined and deploy_systemd_socket_configuration.changed) or
 
    (deploy_systemd_service_configuration is defined and deploy_systemd_service_configuration.changed) or
 
    (install_gunciron_via_requirements is defined and install_gunciron_via_requirements.changed) or
 
    (run_handlers | default(False) | bool() == True))
 
    (run_handlers | default(False) | bool()))
 
  tags:
 
    - handlers
 
    # [ANSIBLE0016] Tasks that run when changed should likely be handlers
 
@@ -325,6 +325,6 @@
 

	
 
- name: Explicitly run all handlers
 
  include: ../handlers/main.yml
 
  when: "run_handlers | default(False) | bool() == True"
 
  when: "run_handlers | default(False) | bool()"
 
  tags:
 
    - handlers
0 comments (0 inline, 0 general)