Remove {{ in when

Cleaning up the warnings like:

[WARNING]: when statements should not include jinja2 templating
delimiters such as {{ }} or {% %}.
Found: {{ nova_cell1_create.rc == 0 }}

Change-Id: Ibfd89123b2c9b2b2e1eab89e2dc9392999b150dd
This commit is contained in:
Jean-Philippe Evrard 2017-05-27 20:59:51 +00:00 committed by Jesse Pretorius (odyssey4me)
parent 8120853dbd
commit d43ca20e24
3 changed files with 8 additions and 8 deletions

View File

@ -19,7 +19,7 @@
register: nova_service_list
retries: 10
delay: 5
until: "{{ ansible_nodename in (nova_service_list.stdout
| from_json
| selectattr('Binary', 'equalto', 'nova-compute')
| map(attribute='Host') | list) }}"
until: "ansible_nodename in (nova_service_list.stdout
| from_json
| selectattr('Binary', 'equalto', 'nova-compute')
| map(attribute='Host') | list)"

View File

@ -30,7 +30,7 @@
shell: "{{ nova_bin }}/nova-manage --config-file /etc/nova/nova.conf cell_v2 list_cells | awk '/{{ nova_cell1_name }}/ {print $4}'"
become: yes
become_user: "{{ nova_system_user_name }}"
when: "{{ nova_cell1_create.rc == 0 }}"
when: "nova_cell1_create.rc == 0"
register: cell1_uuid
tags:
- nova-db-setup
@ -41,7 +41,7 @@
command: "{{ nova_bin }}/nova-manage --config-file /etc/nova/nova.conf cell_v2 map_instances --cell_uuid {{ cell1_uuid.stdout }}"
become: yes
become_user: "{{ nova_system_user_name }}"
when: "{{ nova_cell1_create.rc == 0 }}"
when: "nova_cell1_create.rc == 0"
tags:
- nova-db-setup
- nova-setup

View File

@ -51,8 +51,8 @@
become: yes
become_user: "{{ nova_system_user_name }}"
register: nova_cell1_create
failed_when: "{{ nova_cell1_create.rc not in [0, 2] }}"
changed_when: "{{ nova_cell1_create.rc == 0 }}"
failed_when: "nova_cell1_create.rc not in [0, 2]"
changed_when: "nova_cell1_create.rc == 0"
tags:
- nova-db-setup
- nova-setup