From 597e112a2c02e75e17128fbce1feb79334df8e79 Mon Sep 17 00:00:00 2001 From: caoyuan Date: Mon, 22 May 2017 15:08:58 +0800 Subject: [PATCH] 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 --- ansible/roles/ceph/tasks/bootstrap_osds.yml | 2 +- ansible/roles/ceph/tasks/distribute_keyrings.yml | 4 ++-- ansible/roles/ceph/tasks/start_osds.yml | 2 +- ansible/roles/keystone/tasks/register.yml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ansible/roles/ceph/tasks/bootstrap_osds.yml b/ansible/roles/ceph/tasks/bootstrap_osds.yml index 1ede1aafe6..58f59da7bc 100644 --- a/ansible/roles/ceph/tasks/bootstrap_osds.yml +++ b/ansible/roles/ceph/tasks/bootstrap_osds.yml @@ -16,7 +16,7 @@ -m find_disks -a "partition_name='KOLLA_CEPH_OSD_CACHE_BOOTSTRAP' match_mode='prefix' use_udev={{ kolla_ceph_use_udev }}" 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' - name: Parsing disk info for Ceph Cache OSDs diff --git a/ansible/roles/ceph/tasks/distribute_keyrings.yml b/ansible/roles/ceph/tasks/distribute_keyrings.yml index ea4952a42a..efbd373150 100644 --- a/ansible/roles/ceph/tasks/distribute_keyrings.yml +++ b/ansible/roles/ceph/tasks/distribute_keyrings.yml @@ -2,8 +2,8 @@ - name: Fetching Ceph keyrings command: docker exec ceph_mon fetch_ceph_keys.py register: ceph_files_json - changed_when: "{{ (ceph_files_json.stdout | from_json).changed }}" - failed_when: "{{ (ceph_files_json.stdout | from_json).failed }}" + changed_when: (ceph_files_json.stdout | from_json).changed + failed_when: (ceph_files_json.stdout | from_json).failed delegate_to: "{{ delegate_host }}" run_once: True diff --git a/ansible/roles/ceph/tasks/start_osds.yml b/ansible/roles/ceph/tasks/start_osds.yml index 7bd0d4d045..d35323504c 100644 --- a/ansible/roles/ceph/tasks/start_osds.yml +++ b/ansible/roles/ceph/tasks/start_osds.yml @@ -4,7 +4,7 @@ -m find_disks -a "partition_name='KOLLA_CEPH_DATA' match_mode='prefix' use_udev={{ kolla_ceph_use_udev }}" 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' - name: Parsing disk info for Ceph OSDs diff --git a/ansible/roles/keystone/tasks/register.yml b/ansible/roles/keystone/tasks/register.yml index 7441bd574a..4a9f5ba240 100644 --- a/ansible/roles/keystone/tasks/register.yml +++ b/ansible/roles/keystone/tasks/register.yml @@ -2,8 +2,8 @@ - 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 }} register: keystone_bootstrap - changed_when: "{{ (keystone_bootstrap.stdout | from_json).changed }}" - failed_when: "{{ (keystone_bootstrap.stdout | from_json).failed }}" + changed_when: (keystone_bootstrap.stdout | from_json).changed + failed_when: (keystone_bootstrap.stdout | from_json).failed run_once: True with_items: "{{ multiple_regions_names }}"