]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
playbook: remove jinja syntax in when statement
authorGuillaume Abrioux <gabrioux@redhat.com>
Mon, 29 Oct 2018 19:28:29 +0000 (20:28 +0100)
committerSébastien Han <seb@redhat.com>
Wed, 31 Oct 2018 12:45:41 +0000 (13:45 +0100)
this syntax in deprecated

Closes: #3281
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
infrastructure-playbooks/purge-cluster.yml
roles/ceph-mon/tasks/docker/main.yml
roles/ceph-mon/tasks/docker/start_docker_monitor.yml
roles/ceph-rbd-mirror/tasks/docker/copy_configs.yml

index 0f92b979200a46b068bc934e454c4905e1431ddf..b895cd79797013a9f3ae9102ebeef2533f17c2b7 100644 (file)
   - 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
index cf950b229d5c9a1f95c76942a371f0fd68db421a..41d30bd4e360e5b34564825895b6957796b26a1c 100644 (file)
@@ -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, []) }}"
 
     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
index 409a5020f435653fc33d9d902b545daa2c97d0cb..3645d1057d318a978ab3f4f85cb9d4102e8a537f 100644 (file)
@@ -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
 
index fe3c777ca8ca7a39cfc3ee8c9ac129003c83fb90..3e4cef665057d470e640d6cc98abe1d8629f9410 100644 (file)
@@ -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: