Merge "Fix non-root reconfiguration with ceph enabled"

This commit is contained in:
Zuul 2018-10-03 12:47:07 +00:00 committed by Gerrit Code Review
commit a41bbca824
8 changed files with 24 additions and 1 deletions

View File

@ -4,6 +4,7 @@
path: "{{ node_config_directory }}/glance-api"
state: "directory"
mode: "0770"
become: true
when: inventory_hostname in groups['glance-api']
- name: Copying over ceph.conf(s)
@ -14,6 +15,7 @@
- "{{ node_custom_config }}/ceph/{{ inventory_hostname }}/ceph.conf"
dest: "{{ node_config_directory }}/glance-api/ceph.conf"
mode: "0660"
become: true
when: inventory_hostname in groups['glance-api']
- include_tasks: ../../ceph_pools.yml
@ -40,6 +42,7 @@
key = {{ cephx_key.keyring.key }}
dest: "{{ node_config_directory }}/glance-api/ceph.client.glance.keyring"
mode: "0600"
become: true
when: inventory_hostname in groups['glance-api']
- name: Ensuring config directory has correct owner and permission

View File

@ -4,6 +4,7 @@
path: "{{ node_config_directory }}/glance-api"
state: "directory"
mode: "0770"
become: true
when: inventory_hostname in groups['glance-api']
- name: Copy over ceph files
@ -11,6 +12,7 @@
src: "{{ item }}"
dest: "{{ node_config_directory }}/glance-api/"
mode: "0660"
become: true
when: inventory_hostname in groups['glance-api']
with_fileglob:
- "{{ node_custom_config }}/glance/ceph*"
@ -18,12 +20,12 @@
- Restart glance-api container
- name: Ensuring config directory has correct owner and permission
become: true
file:
path: "{{ node_config_directory }}/{{ item }}"
recurse: yes
owner: "{{ config_owner_user }}"
group: "{{ config_owner_group }}"
become: true
when: inventory_hostname in groups['glance-api']
with_items:
- "glance-api"

View File

@ -3,6 +3,7 @@
file:
path: "{{ node_config_directory }}/{{ item }}"
state: "directory"
become: true
when: inventory_hostname in groups[item]
with_items:
- "gnocchi-api"
@ -16,6 +17,7 @@
- "{{ node_custom_config }}/ceph.conf"
- "{{ node_custom_config }}/ceph/{{ inventory_hostname }}/ceph.conf"
dest: "{{ node_config_directory }}/{{ item }}/ceph.conf"
become: true
when: inventory_hostname in groups[item]
with_items:
- "gnocchi-api"
@ -46,6 +48,7 @@
key = {{ cephx_key.keyring.key }}
dest: "{{ node_config_directory }}/{{ item }}/ceph.client.gnocchi.keyring"
mode: "0600"
become: true
when: inventory_hostname in groups[item]
with_items:
- "gnocchi-api"

View File

@ -3,6 +3,7 @@
file:
path: "{{ node_config_directory }}/{{ item }}"
state: "directory"
become: true
when: inventory_hostname in groups[item]
with_items:
- "gnocchi-api"
@ -13,6 +14,7 @@
template:
src: "{{ node_custom_config }}/gnocchi/ceph.conf"
dest: "{{ node_config_directory }}/{{ item }}/ceph.conf"
become: true
when: inventory_hostname in groups[item]
with_items:
- "gnocchi-api"
@ -27,6 +29,7 @@
copy:
src: "{{ node_custom_config }}/gnocchi/ceph.client.gnocchi.keyring"
dest: "{{ node_config_directory }}/{{ item }}/ceph.client.gnocchi.keyring"
become: true
when: inventory_hostname in groups[item]
with_items:
- "gnocchi-api"

View File

@ -3,6 +3,7 @@
file:
path: "{{ node_config_directory }}/manila-share"
state: "directory"
become: true
- name: Copying over ceph.conf for manila
merge_configs:

View File

@ -3,6 +3,7 @@
file:
path: "{{ node_config_directory }}/manila-share"
state: "directory"
become: true
when:
- inventory_hostname in groups['manila-share']

View File

@ -4,6 +4,7 @@
path: "{{ node_config_directory }}/{{ item }}"
state: "directory"
mode: "0770"
become: true
with_items:
- "nova-compute"
- "nova-libvirt/secrets"
@ -19,6 +20,7 @@
- "{{ node_custom_config }}/ceph/{{ inventory_hostname }}/ceph.conf"
dest: "{{ node_config_directory }}/{{ item }}/ceph.conf"
mode: "0660"
become: true
with_items:
- "nova-compute"
- "nova-libvirt"
@ -58,6 +60,7 @@
key = {{ nova_cephx_key.keyring.key }}
dest: "{{ node_config_directory }}/nova-compute/ceph.client.nova.keyring"
mode: "0600"
become: true
when: inventory_hostname in groups['compute']
- name: Pushing secrets xml for libvirt
@ -65,6 +68,7 @@
src: "secret.xml.j2"
dest: "{{ node_config_directory }}/nova-libvirt/secrets/{{ item.uuid }}.xml"
mode: "0600"
become: true
when:
- inventory_hostname in groups['compute']
- item.enabled | bool
@ -81,6 +85,7 @@
content: "{{ item.content }}"
dest: "{{ node_config_directory }}/nova-libvirt/secrets/{{ item.uuid }}.base64"
mode: "0600"
become: true
when:
- inventory_hostname in groups['compute']
- item.enabled | bool

View File

@ -4,6 +4,7 @@
path: "{{ node_config_directory }}/{{ item }}"
state: "directory"
mode: "0770"
become: true
with_items:
- "nova-compute"
- "nova-libvirt/secrets"
@ -33,6 +34,7 @@
src: "{{ nova_cephx_keyring_file.stat.path }}"
dest: "{{ node_config_directory }}/{{ item }}/"
mode: "0660"
become: true
with_items:
- nova-compute
- nova-libvirt
@ -49,6 +51,7 @@
src: "{{ node_custom_config }}/nova/ceph.conf"
dest: "{{ node_config_directory }}/{{ item }}/"
mode: "0660"
become: true
with_items:
- nova-compute
- nova-libvirt
@ -64,6 +67,7 @@
src: "secret.xml.j2"
dest: "{{ node_config_directory }}/nova-libvirt/secrets/{{ item.uuid }}.xml"
mode: "0600"
become: true
when:
- inventory_hostname in groups['compute']
- item.enabled | bool
@ -98,6 +102,7 @@
content: "{{ item.result.stdout }}"
dest: "{{ node_config_directory }}/nova-libvirt/secrets/{{ item.uuid }}.base64"
mode: "0600"
become: true
when:
- inventory_hostname in groups['compute']
- item.enabled | bool