- 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
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
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
- /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