mirror of https://github.com/ceph/ceph-ansible.git
lint: Don't compare to literal True/False
Use `when: var` rather than `when: var == True` Signed-off-by: Sébastien Han <seb@redhat.com>pull/3311/head
parent
d749dc9f36
commit
87e90a0893
|
@ -10,5 +10,5 @@
|
|||
- "{{ statconfig.results }}"
|
||||
when:
|
||||
- inventory_hostname == groups.get(mon_group_name)
|
||||
- item.1.stat.exists == true
|
||||
- item.1.stat.exists
|
||||
- ceph_health.stdout_lines | length == 0
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
run_once: True
|
||||
with_items: "{{ crt_files_exist.results }}"
|
||||
when:
|
||||
- item.stat.exists == false
|
||||
- not item.stat.exists
|
||||
|
||||
- name: create pem
|
||||
shell: >
|
||||
|
@ -37,7 +37,7 @@
|
|||
register: pem
|
||||
with_items: "{{ crt_files_exist.results }}"
|
||||
when:
|
||||
- item.stat.exists == false
|
||||
- not item.stat.exists
|
||||
|
||||
- name: create public key from pem
|
||||
shell: >
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
enabled: no
|
||||
when:
|
||||
- target.stat.exists
|
||||
- target.stat.islnk == False
|
||||
- not target.stat.islnk
|
||||
|
||||
- name: enable the rbd-target-gw service and make sure it is running
|
||||
service:
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
with_together:
|
||||
- "{{ ceph_config_keys }}"
|
||||
- "{{ statconfig.results }}"
|
||||
when: item.1.stat.exists == true
|
||||
when: item.1.stat.exists
|
||||
|
||||
- name: generate systemd unit file
|
||||
become: true
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
- "{{ ceph_config_keys }}"
|
||||
- "{{ statconfig.results }}"
|
||||
when:
|
||||
- item.1.stat.exists == true
|
||||
- item.1.stat.exists
|
||||
|
||||
- name: create dbus service file
|
||||
become: true
|
||||
|
|
|
@ -38,19 +38,19 @@
|
|||
raw: sudo apt-get -y install python-simplejson
|
||||
ignore_errors: yes
|
||||
when:
|
||||
- systempython2.stat is undefined or systempython2.stat.exists == false
|
||||
- systempython2.stat is undefined or not systempython2.stat.exists
|
||||
|
||||
- name: install python2 for fedora
|
||||
raw: sudo dnf -y install python creates=/usr/bin/python
|
||||
ignore_errors: yes
|
||||
when:
|
||||
- systempython2.stat is undefined or systempython2.stat.exists == false
|
||||
- systempython2.stat is undefined or not systempython2.stat.exists
|
||||
|
||||
- name: install python2 for opensuse
|
||||
raw: sudo zypper -n install python-base creates=/usr/bin/python2.7
|
||||
ignore_errors: yes
|
||||
when:
|
||||
- systempython2.stat is undefined or systempython2.stat.exists == false
|
||||
- systempython2.stat is undefined or not systempython2.stat.exists
|
||||
|
||||
- name: gather facts
|
||||
setup:
|
||||
|
|
Loading…
Reference in New Issue