diff --git a/roles/ceph-container-common/tasks/pre_requisites/prerequisites.yml b/roles/ceph-container-common/tasks/pre_requisites/prerequisites.yml index 2b83815ff..cb8f29860 100644 --- a/roles/ceph-container-common/tasks/pre_requisites/prerequisites.yml +++ b/roles/ceph-container-common/tasks/pre_requisites/prerequisites.yml @@ -54,48 +54,50 @@ tags: with_pkg -- name: red hat 7 based systems tasks +- name: red hat based systems tasks when: - ansible_os_family == 'RedHat' - - ansible_distribution_major_version == '7' block: - - name: install python-docker-py on red hat / centos - package: - name: ['docker', 'python-docker-py'] - state: present - register: result - until: result is succeeded - tags: - with_pkg - - - name: pause after docker install before starting (on openstack vms) - pause: seconds=5 + - name: red hat 7 based systems tasks when: - - ceph_docker_on_openstack - tags: - with_pkg + - ansible_distribution_major_version == '7' + block: + - name: install python-docker-py on red hat / centos + package: + name: ['docker', 'python-docker-py'] + state: present + register: result + until: result is succeeded + tags: + with_pkg - - name: start docker service - service: - name: docker - state: started - enabled: yes - tags: - with_pkg + - name: pause after docker install before starting (on openstack vms) + pause: seconds=5 + when: + - ceph_docker_on_openstack + tags: + with_pkg -- name: red hat 8 based systems tasks - when: - - ansible_os_family == 'RedHat' - - ansible_distribution_major_version == '8' - block: - - name: install podman - package: - name: 'podman' - state: present - register: result - until: result is succeeded - tags: - with_pkg + - name: start docker service + service: + name: docker + state: started + enabled: yes + tags: + with_pkg + + - name: red hat 8 based systems tasks + when: + - ansible_distribution_major_version == '8' + block: + - name: install podman + package: + name: 'podman' + state: present + register: result + until: result is succeeded + tags: + with_pkg - name: ensure tmpfiles.d is present lineinfile: diff --git a/roles/ceph-mon/tasks/ceph_keys.yml b/roles/ceph-mon/tasks/ceph_keys.yml index 8569c2f59..13006d140 100644 --- a/roles/ceph-mon/tasks/ceph_keys.yml +++ b/roles/ceph-mon/tasks/ceph_keys.yml @@ -62,18 +62,17 @@ - "{{ groups.get(mon_group_name) if groups.get(mgr_group_name, []) | length == 0 else groups.get(mgr_group_name, []) }}" delegate_to: "{{ groups[mon_group_name][0] }}" -- name: copy keys to the ansible server - fetch: - src: "{{ item }}" - dest: "{{ fetch_directory }}/{{ fsid }}/{{ item }}" - flat: yes - with_items: - - /var/lib/ceph/bootstrap-osd/{{ cluster }}.keyring - - /var/lib/ceph/bootstrap-rgw/{{ cluster }}.keyring - - /var/lib/ceph/bootstrap-mds/{{ cluster }}.keyring - - /var/lib/ceph/bootstrap-rbd/{{ cluster }}.keyring - - /var/lib/ceph/bootstrap-rbd-mirror/{{ cluster }}.keyring - - /etc/ceph/{{ cluster }}.client.admin.keyring - when: - - cephx - - inventory_hostname == groups[mon_group_name] | last + - name: copy keys to the ansible server + fetch: + src: "{{ item }}" + dest: "{{ fetch_directory }}/{{ fsid }}/{{ item }}" + flat: yes + with_items: + - /var/lib/ceph/bootstrap-osd/{{ cluster }}.keyring + - /var/lib/ceph/bootstrap-rgw/{{ cluster }}.keyring + - /var/lib/ceph/bootstrap-mds/{{ cluster }}.keyring + - /var/lib/ceph/bootstrap-rbd/{{ cluster }}.keyring + - /var/lib/ceph/bootstrap-rbd-mirror/{{ cluster }}.keyring + - /etc/ceph/{{ cluster }}.client.admin.keyring + when: + - inventory_hostname == groups[mon_group_name] | last