forked from ceph/ceph-ansible
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: set copy_admin_key at group_vars level
setting it at extra vars level prevent from setting it per node. Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
- Loading branch information
Showing
9 changed files
with
33 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,24 @@ | ||
--- | ||
- name: copy ceph admin keyring | ||
copy: | ||
src: "{{ fetch_directory }}/{{ fsid }}/etc/ceph/{{ cluster }}.client.admin.keyring" | ||
dest: "/etc/ceph/" | ||
owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}" | ||
group: "{{ ceph_uid if containerized_deployment else 'ceph' }}" | ||
mode: "{{ ceph_keyring_permissions }}" | ||
when: | ||
- cephx | bool | ||
- copy_admin_key | bool | ||
block: | ||
- name: get keys from monitors | ||
command: "{{ container_exec_cmd }} ceph --cluster {{ cluster }} auth get {{ item.name }}" | ||
register: _client_keys | ||
with_items: | ||
- { name: "client.admin", path: "/etc/ceph/{{ cluster }}.client.admin.keyring", copy_key: "{{ copy_admin_key }}" } | ||
delegate_to: "{{ groups.get(mon_group_name)[0] }}" | ||
when: | ||
- cephx | bool | ||
- item.copy_key | bool | ||
|
||
- name: copy ceph key(s) if needed | ||
copy: | ||
dest: "{{ item.item.path }}" | ||
content: "{{ item.stdout + '\n' }}" | ||
owner: "{{ ceph_uid if containerized_deployment else 'ceph' }}" | ||
group: "{{ ceph_uid if containerized_deployment else 'ceph' }}" | ||
mode: "{{ ceph_keyring_permissions }}" | ||
with_items: "{{ _client_keys.results }}" | ||
when: | ||
- item.item.copy_key | bool | ||
when: cephx | bool |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters