From f7d465118630b8faeb6189bcfc1058869fadff47 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Mon, 29 Oct 2018 20:28:29 +0100 Subject: [PATCH] playbook: remove jinja syntax in when statement this syntax in deprecated Closes: #3281 Signed-off-by: Guillaume Abrioux --- infrastructure-playbooks/purge-cluster.yml | 8 ++++---- roles/ceph-mon/tasks/docker/main.yml | 4 ++-- roles/ceph-mon/tasks/docker/start_docker_monitor.yml | 4 ++-- roles/ceph-rbd-mirror/tasks/docker/copy_configs.yml | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/infrastructure-playbooks/purge-cluster.yml b/infrastructure-playbooks/purge-cluster.yml index 0f92b9792..b895cd797 100644 --- a/infrastructure-playbooks/purge-cluster.yml +++ b/infrastructure-playbooks/purge-cluster.yml @@ -312,23 +312,23 @@ - name: wipe table on dm-crypt devices command: dmsetup wipe_table --force "{{ item }}" with_items: "{{ encrypted_ceph_partuuid.stdout_lines }}" - when: "{{ encrypted_ceph_partuuid.stdout_lines | length > 0 }}" + when: encrypted_ceph_partuuid.stdout_lines | length > 0 - name: delete dm-crypt devices if any command: dmsetup remove --retry --force {{ item }} with_items: "{{ encrypted_ceph_partuuid.stdout_lines }}" - when: "{{ encrypted_ceph_partuuid.stdout_lines | length > 0 }}" + when: encrypted_ceph_partuuid.stdout_lines | length > 0 - name: get payload_offset shell: cryptsetup luksDump /dev/disk/by-partuuid/{{ item }} | awk '/Payload offset:/ { print $3 }' register: payload_offset with_items: "{{ encrypted_ceph_partuuid.stdout_lines }}" - when: "{{ encrypted_ceph_partuuid.stdout_lines | length > 0 }}" + when: encrypted_ceph_partuuid.stdout_lines | length > 0 - name: get physical sector size command: blockdev --getpbsz /dev/disk/by-partuuid/{{ item }} with_items: "{{ encrypted_ceph_partuuid.stdout_lines }}" - when: "{{ encrypted_ceph_partuuid.stdout_lines | length > 0 }}" + when: encrypted_ceph_partuuid.stdout_lines | length > 0 register: phys_sector_size - name: wipe dmcrypt device diff --git a/roles/ceph-mon/tasks/docker/main.yml b/roles/ceph-mon/tasks/docker/main.yml index cf950b229..41d30bd4e 100644 --- a/roles/ceph-mon/tasks/docker/main.yml +++ b/roles/ceph-mon/tasks/docker/main.yml @@ -90,7 +90,7 @@ when: - cephx - containerized_deployment - - "{{ groups.get(mgr_group_name, []) | length > 0 }}" + - groups.get(mgr_group_name, []) | length > 0 - not containerized_deployment_with_kv with_items: "{{ groups.get(mgr_group_name, []) }}" @@ -102,7 +102,7 @@ with_items: - "{{ groups.get(mgr_group_name, []) }}" when: - - "{{ groups.get(mgr_group_name, []) | length > 0 }}" + - groups.get(mgr_group_name, []) | length > 0 when: - not rolling_update diff --git a/roles/ceph-mon/tasks/docker/start_docker_monitor.yml b/roles/ceph-mon/tasks/docker/start_docker_monitor.yml index 409a5020f..3645d1057 100644 --- a/roles/ceph-mon/tasks/docker/start_docker_monitor.yml +++ b/roles/ceph-mon/tasks/docker/start_docker_monitor.yml @@ -11,7 +11,7 @@ KV_PORT: "{{kv_port}}" run_once: true when: - - "{{ inventory_hostname == groups[mon_group_name][0] }}" + - inventory_hostname == groups[mon_group_name][0] - containerized_deployment_with_kv - mon_containerized_default_ceph_conf_with_kv @@ -29,7 +29,7 @@ - /etc/ceph/"{{ cluster }}".conf:/etc/ceph/ceph.defaults run_once: true when: - - "{{ inventory_hostname == groups[mon_group_name][0] }}" + - inventory_hostname == groups[mon_group_name][0] - containerized_deployment_with_kv - not mon_containerized_default_ceph_conf_with_kv diff --git a/roles/ceph-rbd-mirror/tasks/docker/copy_configs.yml b/roles/ceph-rbd-mirror/tasks/docker/copy_configs.yml index fe3c777ca..3e4cef665 100644 --- a/roles/ceph-rbd-mirror/tasks/docker/copy_configs.yml +++ b/roles/ceph-rbd-mirror/tasks/docker/copy_configs.yml @@ -15,7 +15,7 @@ failed_when: false check_mode: no register: statconfig - when: "item | length > 0" + when: item | length > 0 - name: try to fetch ceph config and keys copy: