Skip to content

Commit

Permalink
copy-ceph-keys: split infrastruture/kolla keys (#384)
Browse files Browse the repository at this point in the history
Related to osism/issues#893

Signed-off-by: Christian Berendt <berendt@osism.tech>
  • Loading branch information
berendt committed Mar 6, 2024
1 parent 550b5a3 commit 6459b24
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions playbooks/manager/copy-ceph-keys.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

vars:
ceph_ansible_container_name: ceph-ansible
ceph_keys:
ceph_infrastructure_keys:
- src: ceph.client.admin.keyring
dest: "{{ configuration_directory }}/environments/infrastructure/files/ceph/ceph.client.admin.keyring"

ceph_kolla_keys:
- src: ceph.client.cinder.keyring
dest: "{{ configuration_directory }}/environments/kolla/files/overlays/cinder/cinder-volume/ceph.client.cinder.keyring"

Expand Down Expand Up @@ -39,11 +39,20 @@
INTERACTIVE: "false"
changed_when: true

- name: Copy ceph keys to the configuration repository # noqa: ignore-errors
- name: Copy ceph infrastructure keys to the configuration repository
ansible.builtin.command: "docker cp {{ ceph_ansible_container_name }}:/share/{{ ceph_cluster_fsid }}/etc/ceph/{{ item.src }} {{ item.dest }}"
changed_when: true
loop: "{{ ceph_infrastructure_keys }}"
tags:
- infrastructure

- name: Copy ceph kolla keys to the configuration repository # noqa: ignore-errors
ansible.builtin.command: "docker cp {{ ceph_ansible_container_name }}:/share/{{ ceph_cluster_fsid }}/etc/ceph/{{ item.src }} {{ item.dest }}"
changed_when: true
# It is possible that certain keys are not available in an environment
# or certain services have not been activated. In this case, errors are
# ignored.
ignore_errors: true
loop: "{{ ceph_keys }}"
loop: "{{ ceph_kolla_keys }}"
tags:
- kolla

0 comments on commit 6459b24

Please sign in to comment.