Remove the unnecessary jinja2 templating delimiters

[WARNING]: when statements should not include jinja2 templating
delimiters such as {{ }} or {% %}. Found: {{
(keystone_bootstrap.stdout | from_json).changed }}

Closes-Bug: #1689550

Change-Id: Ib6fdbcde02319011b072990f06fbd5e74b8d2d93
This commit is contained in:
caoyuan 2017-05-22 15:08:58 +08:00
parent 7d23bd3712
commit 597e112a2c
4 changed files with 6 additions and 6 deletions

View File

@ -16,7 +16,7 @@
-m find_disks -m find_disks
-a "partition_name='KOLLA_CEPH_OSD_CACHE_BOOTSTRAP' match_mode='prefix' use_udev={{ kolla_ceph_use_udev }}" -a "partition_name='KOLLA_CEPH_OSD_CACHE_BOOTSTRAP' match_mode='prefix' use_udev={{ kolla_ceph_use_udev }}"
register: osd_cache_lookup register: osd_cache_lookup
changed_when: "{{ osd_cache_lookup.stdout.find('localhost | SUCCESS => ') != -1 and (osd_cache_lookup.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}" changed_when: osd_cache_lookup.stdout.find('localhost | SUCCESS => ') != -1 and (osd_cache_lookup.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed
failed_when: osd_cache_lookup.stdout.split()[2] != 'SUCCESS' failed_when: osd_cache_lookup.stdout.split()[2] != 'SUCCESS'
- name: Parsing disk info for Ceph Cache OSDs - name: Parsing disk info for Ceph Cache OSDs

View File

@ -2,8 +2,8 @@
- name: Fetching Ceph keyrings - name: Fetching Ceph keyrings
command: docker exec ceph_mon fetch_ceph_keys.py command: docker exec ceph_mon fetch_ceph_keys.py
register: ceph_files_json register: ceph_files_json
changed_when: "{{ (ceph_files_json.stdout | from_json).changed }}" changed_when: (ceph_files_json.stdout | from_json).changed
failed_when: "{{ (ceph_files_json.stdout | from_json).failed }}" failed_when: (ceph_files_json.stdout | from_json).failed
delegate_to: "{{ delegate_host }}" delegate_to: "{{ delegate_host }}"
run_once: True run_once: True

View File

@ -4,7 +4,7 @@
-m find_disks -m find_disks
-a "partition_name='KOLLA_CEPH_DATA' match_mode='prefix' use_udev={{ kolla_ceph_use_udev }}" -a "partition_name='KOLLA_CEPH_DATA' match_mode='prefix' use_udev={{ kolla_ceph_use_udev }}"
register: osd_lookup register: osd_lookup
changed_when: "{{ osd_lookup.stdout.find('localhost | SUCCESS => ') != -1 and (osd_lookup.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}" changed_when: osd_lookup.stdout.find('localhost | SUCCESS => ') != -1 and (osd_lookup.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed
failed_when: osd_lookup.stdout.split()[2] != 'SUCCESS' failed_when: osd_lookup.stdout.split()[2] != 'SUCCESS'
- name: Parsing disk info for Ceph OSDs - name: Parsing disk info for Ceph OSDs

View File

@ -2,8 +2,8 @@
- name: Creating admin project, user, role, service, and endpoint - name: Creating admin project, user, role, service, and endpoint
command: docker exec keystone kolla_keystone_bootstrap {{ openstack_auth.username }} {{ openstack_auth.password }} {{ openstack_auth.project_name }} admin {{ keystone_admin_url }} {{ keystone_internal_url }} {{ keystone_public_url }} {{ item }} command: docker exec keystone kolla_keystone_bootstrap {{ openstack_auth.username }} {{ openstack_auth.password }} {{ openstack_auth.project_name }} admin {{ keystone_admin_url }} {{ keystone_internal_url }} {{ keystone_public_url }} {{ item }}
register: keystone_bootstrap register: keystone_bootstrap
changed_when: "{{ (keystone_bootstrap.stdout | from_json).changed }}" changed_when: (keystone_bootstrap.stdout | from_json).changed
failed_when: "{{ (keystone_bootstrap.stdout | from_json).failed }}" failed_when: (keystone_bootstrap.stdout | from_json).failed
run_once: True run_once: True
with_items: "{{ multiple_regions_names }}" with_items: "{{ multiple_regions_names }}"