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 }}"
|
- "{{ statconfig.results }}"
|
||||||
when:
|
when:
|
||||||
- inventory_hostname == groups.get(mon_group_name)
|
- inventory_hostname == groups.get(mon_group_name)
|
||||||
- item.1.stat.exists == true
|
- item.1.stat.exists
|
||||||
- ceph_health.stdout_lines | length == 0
|
- ceph_health.stdout_lines | length == 0
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
run_once: True
|
run_once: True
|
||||||
with_items: "{{ crt_files_exist.results }}"
|
with_items: "{{ crt_files_exist.results }}"
|
||||||
when:
|
when:
|
||||||
- item.stat.exists == false
|
- not item.stat.exists
|
||||||
|
|
||||||
- name: create pem
|
- name: create pem
|
||||||
shell: >
|
shell: >
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
register: pem
|
register: pem
|
||||||
with_items: "{{ crt_files_exist.results }}"
|
with_items: "{{ crt_files_exist.results }}"
|
||||||
when:
|
when:
|
||||||
- item.stat.exists == false
|
- not item.stat.exists
|
||||||
|
|
||||||
- name: create public key from pem
|
- name: create public key from pem
|
||||||
shell: >
|
shell: >
|
||||||
|
|
|
@ -58,7 +58,7 @@
|
||||||
enabled: no
|
enabled: no
|
||||||
when:
|
when:
|
||||||
- target.stat.exists
|
- target.stat.exists
|
||||||
- target.stat.islnk == False
|
- not target.stat.islnk
|
||||||
|
|
||||||
- name: enable the rbd-target-gw service and make sure it is running
|
- name: enable the rbd-target-gw service and make sure it is running
|
||||||
service:
|
service:
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
with_together:
|
with_together:
|
||||||
- "{{ ceph_config_keys }}"
|
- "{{ ceph_config_keys }}"
|
||||||
- "{{ statconfig.results }}"
|
- "{{ statconfig.results }}"
|
||||||
when: item.1.stat.exists == true
|
when: item.1.stat.exists
|
||||||
|
|
||||||
- name: generate systemd unit file
|
- name: generate systemd unit file
|
||||||
become: true
|
become: true
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
- "{{ ceph_config_keys }}"
|
- "{{ ceph_config_keys }}"
|
||||||
- "{{ statconfig.results }}"
|
- "{{ statconfig.results }}"
|
||||||
when:
|
when:
|
||||||
- item.1.stat.exists == true
|
- item.1.stat.exists
|
||||||
|
|
||||||
- name: create dbus service file
|
- name: create dbus service file
|
||||||
become: true
|
become: true
|
||||||
|
|
|
@ -38,19 +38,19 @@
|
||||||
raw: sudo apt-get -y install python-simplejson
|
raw: sudo apt-get -y install python-simplejson
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
when:
|
when:
|
||||||
- systempython2.stat is undefined or systempython2.stat.exists == false
|
- systempython2.stat is undefined or not systempython2.stat.exists
|
||||||
|
|
||||||
- name: install python2 for fedora
|
- name: install python2 for fedora
|
||||||
raw: sudo dnf -y install python creates=/usr/bin/python
|
raw: sudo dnf -y install python creates=/usr/bin/python
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
when:
|
when:
|
||||||
- systempython2.stat is undefined or systempython2.stat.exists == false
|
- systempython2.stat is undefined or not systempython2.stat.exists
|
||||||
|
|
||||||
- name: install python2 for opensuse
|
- name: install python2 for opensuse
|
||||||
raw: sudo zypper -n install python-base creates=/usr/bin/python2.7
|
raw: sudo zypper -n install python-base creates=/usr/bin/python2.7
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
when:
|
when:
|
||||||
- systempython2.stat is undefined or systempython2.stat.exists == false
|
- systempython2.stat is undefined or not systempython2.stat.exists
|
||||||
|
|
||||||
- name: gather facts
|
- name: gather facts
|
||||||
setup:
|
setup:
|
||||||
|
|
Loading…
Reference in New Issue