Merge "[external-ceph] Use template instead of copy"
This commit is contained in:
commit
ed148cd8dd
@ -20,7 +20,7 @@
|
|||||||
- Restart {{ item.key }} container
|
- Restart {{ item.key }} container
|
||||||
|
|
||||||
- name: Copy over Ceph keyring files for cinder-volume
|
- name: Copy over Ceph keyring files for cinder-volume
|
||||||
copy:
|
template:
|
||||||
src: "{{ node_custom_config }}/cinder/cinder-volume/{{ ceph_cinder_keyring }}"
|
src: "{{ node_custom_config }}/cinder/cinder-volume/{{ ceph_cinder_keyring }}"
|
||||||
dest: "{{ node_config_directory }}/cinder-volume/"
|
dest: "{{ node_config_directory }}/cinder-volume/"
|
||||||
mode: "0660"
|
mode: "0660"
|
||||||
@ -33,7 +33,7 @@
|
|||||||
- Restart cinder-volume container
|
- Restart cinder-volume container
|
||||||
|
|
||||||
- name: Copy over Ceph keyring files for cinder-backup
|
- name: Copy over Ceph keyring files for cinder-backup
|
||||||
copy:
|
template:
|
||||||
src: "{{ node_custom_config }}/cinder/{{ item }}"
|
src: "{{ node_custom_config }}/cinder/{{ item }}"
|
||||||
dest: "{{ node_config_directory }}/cinder-backup/"
|
dest: "{{ node_config_directory }}/cinder-backup/"
|
||||||
mode: "0660"
|
mode: "0660"
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
- Restart glance-api container
|
- Restart glance-api container
|
||||||
|
|
||||||
- name: Copy over ceph Glance keyring
|
- name: Copy over ceph Glance keyring
|
||||||
copy:
|
template:
|
||||||
src: "{{ node_custom_config }}/glance/{{ ceph_glance_keyring }}"
|
src: "{{ node_custom_config }}/glance/{{ ceph_glance_keyring }}"
|
||||||
dest: "{{ node_config_directory }}/glance-api/{{ ceph_glance_keyring }}"
|
dest: "{{ node_config_directory }}/glance-api/{{ ceph_glance_keyring }}"
|
||||||
mode: "0660"
|
mode: "0660"
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
- Restart {{ item.key }} container
|
- Restart {{ item.key }} container
|
||||||
|
|
||||||
- name: Copy over ceph gnocchi keyring
|
- name: Copy over ceph gnocchi keyring
|
||||||
copy:
|
template:
|
||||||
src: "{{ node_custom_config }}/gnocchi/{{ ceph_gnocchi_keyring }}"
|
src: "{{ node_custom_config }}/gnocchi/{{ ceph_gnocchi_keyring }}"
|
||||||
dest: "{{ node_config_directory }}/{{ item.key }}/{{ ceph_gnocchi_keyring }}"
|
dest: "{{ node_config_directory }}/{{ item.key }}/{{ ceph_gnocchi_keyring }}"
|
||||||
mode: "0660"
|
mode: "0660"
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
- Restart manila-share container
|
- Restart manila-share container
|
||||||
|
|
||||||
- name: Copy over Ceph keyring files for manila
|
- name: Copy over Ceph keyring files for manila
|
||||||
copy:
|
template:
|
||||||
src: "{{ node_custom_config }}/manila/{{ ceph_manila_keyring }}"
|
src: "{{ node_custom_config }}/manila/{{ ceph_manila_keyring }}"
|
||||||
dest: "{{ node_config_directory }}/manila-share/{{ ceph_manila_keyring }}"
|
dest: "{{ node_config_directory }}/manila-share/{{ ceph_manila_keyring }}"
|
||||||
mode: "0600"
|
mode: "0600"
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
- external_ceph_cephx_enabled | bool
|
- external_ceph_cephx_enabled | bool
|
||||||
|
|
||||||
- name: Copy over ceph nova keyring file
|
- name: Copy over ceph nova keyring file
|
||||||
copy:
|
template:
|
||||||
src: "{{ nova_cephx_keyring_file.stat.path }}"
|
src: "{{ nova_cephx_keyring_file.stat.path }}"
|
||||||
dest: "{{ node_config_directory }}/{{ item }}/"
|
dest: "{{ node_config_directory }}/{{ item }}/"
|
||||||
mode: "0660"
|
mode: "0660"
|
||||||
@ -47,7 +47,7 @@
|
|||||||
- Restart {{ item }} container
|
- Restart {{ item }} container
|
||||||
|
|
||||||
- name: Copy over ceph cinder keyring file
|
- name: Copy over ceph cinder keyring file
|
||||||
copy:
|
template:
|
||||||
src: "{{ cinder_cephx_keyring_file.stat.path }}"
|
src: "{{ cinder_cephx_keyring_file.stat.path }}"
|
||||||
dest: "{{ node_config_directory }}/{{ item }}/"
|
dest: "{{ node_config_directory }}/{{ item }}/"
|
||||||
mode: "0660"
|
mode: "0660"
|
||||||
@ -98,7 +98,7 @@
|
|||||||
- name: Extract nova key from file
|
- name: Extract nova key from file
|
||||||
set_fact:
|
set_fact:
|
||||||
nova_cephx_raw_key:
|
nova_cephx_raw_key:
|
||||||
"{{ lookup('file', nova_cephx_keyring_file.stat.path) | regex_search('key\\s*=.*$', multiline=True) | regex_replace('key\\s*=\\s*(.*)\\s*', '\\1') }}"
|
"{{ lookup('template', nova_cephx_keyring_file.stat.path) | regex_search('key\\s*=.*$', multiline=True) | regex_replace('key\\s*=\\s*(.*)\\s*', '\\1') }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
run_once: True
|
run_once: True
|
||||||
when:
|
when:
|
||||||
@ -108,7 +108,7 @@
|
|||||||
- name: Extract cinder key from file
|
- name: Extract cinder key from file
|
||||||
set_fact:
|
set_fact:
|
||||||
cinder_cephx_raw_key:
|
cinder_cephx_raw_key:
|
||||||
"{{ lookup('file', cinder_cephx_keyring_file.stat.path) | regex_search('key\\s*=.*$', multiline=True) | regex_replace('key\\s*=\\s*(.*)\\s*', '\\1') }}"
|
"{{ lookup('template', cinder_cephx_keyring_file.stat.path) | regex_search('key\\s*=.*$', multiline=True) | regex_replace('key\\s*=\\s*(.*)\\s*', '\\1') }}"
|
||||||
changed_when: false
|
changed_when: false
|
||||||
run_once: True
|
run_once: True
|
||||||
when:
|
when:
|
||||||
|
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
Allows the use of variables in ceph conf and keyring files.
|
||||||
|
Consistently use template instead of copy. This has the added
|
||||||
|
advantage of allowing variables inside ceph conf files and keyrings.
|
||||||
|
Including but not limited to ansible lookup expressions.
|
||||||
|
`LP#1959565 <https://launchpad.net/bugs/1959565>`__
|
Loading…
Reference in New Issue
Block a user