* [98cb6ed8](https://github.com/ceph/ceph-ansible/commit/98cb6ed8) - tests: avoid yum failures (Guillaume Abrioux)
* [144b2fce](https://github.com/ceph/ceph-ansible/commit/144b2fce) - python-netaddr is required to generate ceph.conf (Ha Phan)
* [e91648a7](https://github.com/ceph/ceph-ansible/commit/e91648a7) - rolling_update: add role ceph-iscsi-gw (Sébastien Han)
-* [2890b57c](https://github.com/ceph/ceph-ansible/commit/2890b57c) - Add privilege escalation to iscsi purge tasks (Paul Cuzner)
+* [2890b57c](https://github.com/ceph/ceph-ansible/commit/2890b57c) - Add privilege escalation to iscsi purge tasks (Paul Cuzner)
* [608ea947](https://github.com/ceph/ceph-ansible/commit/608ea947) - mds: move mds fs pools creation (Guillaume Abrioux)
* [1c084efb](https://github.com/ceph/ceph-ansible/commit/1c084efb) - rgw: container add option to configure multi-site zone (Sébastien Han)
* [82884801](https://github.com/ceph/ceph-ansible/commit/82884801) - playbook: follow up on #2553 (Guillaume Abrioux)
- "{{ rbdmirror_group_name|default('rbdmirrors') }}"
- "{{ nfs_group_name|default('nfss') }}"
- "{{ client_group_name|default('clients') }}"
- - "{{ mgr_group_name|default('mgrs') }}"
+ - "{{ mgr_group_name|default('mgrs') }}"
become: true
- name: wipe partitions
shell: |
wipefs --all "{{ item }}"
- dd if=/dev/zero of="{{ item }}" bs=1 count=4096
+ dd if=/dev/zero of="{{ item }}" bs=1 count=4096
with_items: "{{ combined_devices_list }}"
- name: zap ceph journal/block db/block wal partitions
pre_tasks:
- name: non container - get current fsid
- command: "ceph --cluster {{ cluster }} fsid"
+ command: "ceph --cluster {{ cluster }} fsid"
register: cluster_uuid_non_container
delegate_to: "{{ groups[mon_group_name][0] }}"
when:
- not containerized_deployment
- name: container - get current fsid
- command: "docker exec ceph-mon-{{ hostvars[groups[mon_group_name][0]]['ansible_hostname'] }} ceph --cluster {{ cluster }} fsid"
+ command: "docker exec ceph-mon-{{ hostvars[groups[mon_group_name][0]]['ansible_hostname'] }} ceph --cluster {{ cluster }} fsid"
register: cluster_uuid_container
delegate_to: "{{ groups[mon_group_name][0] }}"
when:
when:
- cephx
- keys | length > 0
- - inventory_hostname == groups.get('_filtered_clients') | first
+ - inventory_hostname == groups.get('_filtered_clients') | first
- name: slurp client cephx key(s)
slurp:
when:
- cephx
- keys | length > 0
- - inventory_hostname == groups.get('_filtered_clients') | first
+ - inventory_hostname == groups.get('_filtered_clients') | first
- name: pool related tasks
when:
- name: get client cephx keys
copy:
- dest: "{{ item.source }}"
+ dest: "{{ item.source }}"
content: "{{ item.content | b64decode }}"
mode: "{{ item.item.get('mode', '0600') }}"
owner: "{{ ceph_uid }}"
---
-- name: check if /var/lib/ceph/mon/{{ cluster }}-{{ monitor_name }}/keyring already exists
+- name: check if /var/lib/ceph/mon/{{ cluster }}-{{ monitor_name }}/keyring already exists
stat:
- path: /var/lib/ceph/mon/{{ cluster }}-{{ monitor_name }}/keyring
+ path: /var/lib/ceph/mon/{{ cluster }}-{{ monitor_name }}/keyring
register: initial_mon_keyring
-- name: fail if /var/lib/ceph/mon/{{ cluster }}-{{ monitor_name }}/keyring doesn't exist
+- name: fail if /var/lib/ceph/mon/{{ cluster }}-{{ monitor_name }}/keyring doesn't exist
fail:
- msg: "/var/lib/ceph/mon/{{ cluster }}-{{ monitor_name }}/keyring not found"
+ msg: "/var/lib/ceph/mon/{{ cluster }}-{{ monitor_name }}/keyring not found"
when:
- not initial_mon_keyring.stat.exists
- name: get existing initial mon keyring if it already exists but not monitor_keyring.conf in {{ fetch_directory }}
shell: |
- grep key /var/lib/ceph/mon/{{ cluster }}-{{ monitor_name }}/keyring | sed 's/^.*= //'
+ grep key /var/lib/ceph/mon/{{ cluster }}-{{ monitor_name }}/keyring | sed 's/^.*= //'
register: monitor_keyring
when:
- not monitor_keyring_conf.stat.exists
- name: test existing initial mon keyring
- command: ceph --connect-timeout 3 --cluster {{ cluster }} --keyring /var/lib/ceph/mon/{{ cluster }}-{{ monitor_name }}/keyring -n mon. fsid
+ command: ceph --connect-timeout 3 --cluster {{ cluster }} --keyring /var/lib/ceph/mon/{{ cluster }}-{{ monitor_name }}/keyring -n mon. fsid
register: test_initial_monitor_keyring
ignore_errors: true
- containerized_deployment
- name: check if "{{ ceph_nfs_rgw_user }}" exists
- command: "{{ docker_exec_cmd_nfs | default('') }} radosgw-admin --cluster {{ cluster }} user info --uid={{ ceph_nfs_rgw_user }}"
+ command: "{{ docker_exec_cmd_nfs | default('') }} radosgw-admin --cluster {{ cluster }} user info --uid={{ ceph_nfs_rgw_user }}"
run_once: true
register: rgwuser_exists
changed_when: false
- nfs_obj_gw
- name: create rgw nfs user "{{ ceph_nfs_rgw_user }}"
- command: "{{ docker_exec_cmd_nfs | default('') }} radosgw-admin --cluster {{ cluster }} user create --uid={{ ceph_nfs_rgw_user }} --display-name='RGW NFS User'"
+ command: "{{ docker_exec_cmd_nfs | default('') }} radosgw-admin --cluster {{ cluster }} user create --uid={{ ceph_nfs_rgw_user }} --display-name='RGW NFS User'"
run_once: true
register: rgwuser
changed_when: false
shell: >
test "$({{ hostvars[groups[mon_group_name][0]]['docker_exec_cmd'] | default('') }} ceph --cluster {{ cluster }} -s -f json | python -c 'import sys, json; print(json.load(sys.stdin)["osdmap"]["osdmap"]["num_osds"])')" -gt 0 &&
test "$({{ hostvars[groups[mon_group_name][0]]['docker_exec_cmd'] | default('') }} ceph --cluster {{ cluster }} -s -f json | python -c 'import sys, json; print(json.load(sys.stdin)["osdmap"]["osdmap"]["num_osds"])')" =
- "$({{ hostvars[groups[mon_group_name][0]]['docker_exec_cmd'] | default('') }} ceph --cluster {{ cluster }} -s -f json | python -c 'import sys, json; print(json.load(sys.stdin)["osdmap"]["osdmap"]["num_up_osds"])')"
+ "$({{ hostvars[groups[mon_group_name][0]]['docker_exec_cmd'] | default('') }} ceph --cluster {{ cluster }} -s -f json | python -c 'import sys, json; print(json.load(sys.stdin)["osdmap"]["osdmap"]["num_up_osds"])')"
register: wait_for_all_osds_up
retries: "{{ nb_retry_wait_osd_up }}"
delay: "{{ delay_wait_osd_up }}"
- name: copy to other mons the openstack cephx key(s)
copy:
- src: "{{ fetch_directory }}/{{ fsid }}/etc/ceph/{{ cluster }}.{{ item.1.name }}.keyring"
+ src: "{{ fetch_directory }}/{{ fsid }}/etc/ceph/{{ cluster }}.{{ item.1.name }}.keyring"
dest: "/etc/ceph/{{ cluster }}.{{ item.1.name }}.keyring"
owner: "{{ ceph_uid }}"
group: "{{ ceph_uid }}"
---
- name: update period
- command: "{{ docker_exec_cmd }} radosgw-admin --cluster {{ cluster }} period update --commit"
+ command: "{{ docker_exec_cmd }} radosgw-admin --cluster {{ cluster }} period update --commit"
delegate_to: "{{ groups[mon_group_name][0] }}"
run_once: true
fail:
msg: "{{ inventory_hostname }} does not have any {{ ip_version }} address on {{ monitor_address_block }}"
when:
- - hostvars[inventory_hostname]['ansible_all_' + ip_version + '_addresses'] | ipaddr(hostvars[inventory_hostname]['monitor_address_block']) | length == 0
+ - hostvars[inventory_hostname]['ansible_all_' + ip_version + '_addresses'] | ipaddr(hostvars[inventory_hostname]['monitor_address_block']) | length == 0