Merge "Generate Ceph configuration during upgrade"
This commit is contained in:
commit
c0435b833a
@ -1,22 +1,4 @@
|
|||||||
---
|
---
|
||||||
- name: Ensuring config directory exists
|
|
||||||
vars:
|
|
||||||
services_need_directory:
|
|
||||||
- "cinder-volume"
|
|
||||||
- "cinder-backup"
|
|
||||||
file:
|
|
||||||
path: "{{ node_config_directory }}/{{ item.key }}"
|
|
||||||
state: "directory"
|
|
||||||
owner: "{{ config_owner_user }}"
|
|
||||||
group: "{{ config_owner_group }}"
|
|
||||||
mode: "0770"
|
|
||||||
become: true
|
|
||||||
when:
|
|
||||||
- item.value.enabled | bool
|
|
||||||
- inventory_hostname in groups[item.value.group]
|
|
||||||
- item.key in services_need_directory
|
|
||||||
with_dict: "{{ cinder_services }}"
|
|
||||||
|
|
||||||
- name: Copying over ceph.conf(s)
|
- name: Copying over ceph.conf(s)
|
||||||
vars:
|
vars:
|
||||||
services_need_config:
|
services_need_config:
|
||||||
|
@ -12,6 +12,21 @@
|
|||||||
- item.value.enabled | bool
|
- item.value.enabled | bool
|
||||||
with_dict: "{{ cinder_services }}"
|
with_dict: "{{ cinder_services }}"
|
||||||
|
|
||||||
|
- include_tasks: ceph.yml
|
||||||
|
when:
|
||||||
|
- (enable_ceph | bool) and (cinder_backend_ceph | bool)
|
||||||
|
- inventory_hostname in groups['ceph-mon'] or
|
||||||
|
inventory_hostname in groups['cinder-api'] or
|
||||||
|
inventory_hostname in groups['cinder-volume'] or
|
||||||
|
inventory_hostname in groups['cinder-scheduler'] or
|
||||||
|
inventory_hostname in groups['cinder-backup']
|
||||||
|
|
||||||
|
- include_tasks: external_ceph.yml
|
||||||
|
when:
|
||||||
|
- (enable_ceph | bool == False) and (cinder_backend_ceph | bool)
|
||||||
|
- inventory_hostname in groups['cinder-volume'] or
|
||||||
|
inventory_hostname in groups['cinder-backup']
|
||||||
|
|
||||||
- name: Check if policies shall be overwritten
|
- name: Check if policies shall be overwritten
|
||||||
local_action: stat path="{{ item }}"
|
local_action: stat path="{{ item }}"
|
||||||
run_once: True
|
run_once: True
|
||||||
|
@ -1,24 +1,10 @@
|
|||||||
---
|
---
|
||||||
- include_tasks: ceph.yml
|
|
||||||
when:
|
|
||||||
- (enable_ceph | bool) and (cinder_backend_ceph | bool)
|
|
||||||
- inventory_hostname in groups['ceph-mon'] or
|
|
||||||
inventory_hostname in groups['cinder-api'] or
|
|
||||||
inventory_hostname in groups['cinder-volume'] or
|
|
||||||
inventory_hostname in groups['cinder-scheduler'] or
|
|
||||||
inventory_hostname in groups['cinder-backup']
|
|
||||||
|
|
||||||
- include_tasks: external_ceph.yml
|
|
||||||
when:
|
|
||||||
- (enable_ceph | bool == False) and (cinder_backend_ceph | bool)
|
|
||||||
- inventory_hostname in groups['cinder-volume'] or
|
|
||||||
inventory_hostname in groups['cinder-backup']
|
|
||||||
|
|
||||||
- include_tasks: register.yml
|
- include_tasks: register.yml
|
||||||
when: inventory_hostname in groups['cinder-api']
|
when: inventory_hostname in groups['cinder-api']
|
||||||
|
|
||||||
- include_tasks: config.yml
|
- include_tasks: config.yml
|
||||||
when: inventory_hostname in groups['cinder-api'] or
|
when: inventory_hostname in groups['ceph-mon'] or
|
||||||
|
inventory_hostname in groups['cinder-api'] or
|
||||||
inventory_hostname in groups['cinder-volume'] or
|
inventory_hostname in groups['cinder-volume'] or
|
||||||
inventory_hostname in groups['cinder-scheduler'] or
|
inventory_hostname in groups['cinder-scheduler'] or
|
||||||
inventory_hostname in groups['cinder-backup']
|
inventory_hostname in groups['cinder-backup']
|
||||||
|
@ -1,22 +1,4 @@
|
|||||||
---
|
---
|
||||||
- name: Ensuring config directory exists
|
|
||||||
vars:
|
|
||||||
services_need_directory:
|
|
||||||
- "cinder-volume"
|
|
||||||
- "cinder-backup"
|
|
||||||
file:
|
|
||||||
path: "{{ node_config_directory }}/{{ item.key }}"
|
|
||||||
state: "directory"
|
|
||||||
owner: "{{ config_owner_user }}"
|
|
||||||
group: "{{ config_owner_group }}"
|
|
||||||
mode: "0770"
|
|
||||||
become: true
|
|
||||||
when:
|
|
||||||
- item.value.enabled | bool
|
|
||||||
- inventory_hostname in groups[item.value.group]
|
|
||||||
- item.key in services_need_directory
|
|
||||||
with_dict: "{{ cinder_services }}"
|
|
||||||
|
|
||||||
- name: Copying over ceph.conf for Cinder
|
- name: Copying over ceph.conf for Cinder
|
||||||
vars:
|
vars:
|
||||||
services_need_config:
|
services_need_config:
|
||||||
|
@ -1,12 +1,4 @@
|
|||||||
---
|
---
|
||||||
- name: Ensuring config directory exists
|
|
||||||
file:
|
|
||||||
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)
|
- name: Copying over ceph.conf(s)
|
||||||
merge_configs:
|
merge_configs:
|
||||||
sources:
|
sources:
|
||||||
|
@ -1,14 +1,4 @@
|
|||||||
---
|
---
|
||||||
- include_tasks: ceph.yml
|
|
||||||
when:
|
|
||||||
- enable_ceph | bool
|
|
||||||
- glance_backend_ceph | bool
|
|
||||||
|
|
||||||
- include_tasks: external_ceph.yml
|
|
||||||
when:
|
|
||||||
- enable_ceph | bool == False
|
|
||||||
- glance_backend_ceph | bool
|
|
||||||
|
|
||||||
- name: Ensuring config directories exist
|
- name: Ensuring config directories exist
|
||||||
file:
|
file:
|
||||||
path: "{{ node_config_directory }}/{{ item.key }}"
|
path: "{{ node_config_directory }}/{{ item.key }}"
|
||||||
@ -22,6 +12,16 @@
|
|||||||
- item.value.enabled | bool
|
- item.value.enabled | bool
|
||||||
with_dict: "{{ glance_services }}"
|
with_dict: "{{ glance_services }}"
|
||||||
|
|
||||||
|
- include_tasks: ceph.yml
|
||||||
|
when:
|
||||||
|
- enable_ceph | bool
|
||||||
|
- glance_backend_ceph | bool
|
||||||
|
|
||||||
|
- include_tasks: external_ceph.yml
|
||||||
|
when:
|
||||||
|
- enable_ceph | bool == False
|
||||||
|
- glance_backend_ceph | bool
|
||||||
|
|
||||||
- name: Check if policies shall be overwritten
|
- name: Check if policies shall be overwritten
|
||||||
local_action: stat path="{{ item }}"
|
local_action: stat path="{{ item }}"
|
||||||
run_once: True
|
run_once: True
|
||||||
|
@ -1,12 +1,4 @@
|
|||||||
---
|
---
|
||||||
- name: Ensuring config directory exists
|
|
||||||
file:
|
|
||||||
path: "{{ node_config_directory }}/glance-api"
|
|
||||||
state: "directory"
|
|
||||||
mode: "0770"
|
|
||||||
become: true
|
|
||||||
when: inventory_hostname in groups['glance-api']
|
|
||||||
|
|
||||||
- name: Copy over ceph files
|
- name: Copy over ceph files
|
||||||
copy:
|
copy:
|
||||||
src: "{{ item }}"
|
src: "{{ item }}"
|
||||||
|
@ -1,15 +1,4 @@
|
|||||||
---
|
---
|
||||||
- name: Ensuring config directory exists
|
|
||||||
file:
|
|
||||||
path: "{{ node_config_directory }}/{{ item }}"
|
|
||||||
state: "directory"
|
|
||||||
become: true
|
|
||||||
when: inventory_hostname in groups[item]
|
|
||||||
with_items:
|
|
||||||
- "gnocchi-api"
|
|
||||||
- "gnocchi-metricd"
|
|
||||||
- "gnocchi-statsd"
|
|
||||||
|
|
||||||
- name: Copying over ceph.conf(s)
|
- name: Copying over ceph.conf(s)
|
||||||
merge_configs:
|
merge_configs:
|
||||||
sources:
|
sources:
|
||||||
|
@ -12,6 +12,16 @@
|
|||||||
- item.value.enabled | bool
|
- item.value.enabled | bool
|
||||||
with_dict: "{{ gnocchi_services }}"
|
with_dict: "{{ gnocchi_services }}"
|
||||||
|
|
||||||
|
- include_tasks: ceph.yml
|
||||||
|
when:
|
||||||
|
- enable_ceph | bool
|
||||||
|
- gnocchi_backend_storage == 'ceph'
|
||||||
|
|
||||||
|
- include_tasks: external_ceph.yml
|
||||||
|
when:
|
||||||
|
- enable_ceph | bool == False
|
||||||
|
- gnocchi_backend_storage == 'ceph'
|
||||||
|
|
||||||
- name: Check if policies shall be overwritten
|
- name: Check if policies shall be overwritten
|
||||||
local_action: stat path="{{ item }}"
|
local_action: stat path="{{ item }}"
|
||||||
run_once: True
|
run_once: True
|
||||||
|
@ -1,14 +1,4 @@
|
|||||||
---
|
---
|
||||||
- include_tasks: ceph.yml
|
|
||||||
when:
|
|
||||||
- enable_ceph | bool
|
|
||||||
- gnocchi_backend_storage == 'ceph'
|
|
||||||
|
|
||||||
- include_tasks: external_ceph.yml
|
|
||||||
when:
|
|
||||||
- enable_ceph | bool == False
|
|
||||||
- gnocchi_backend_storage == 'ceph'
|
|
||||||
|
|
||||||
- include_tasks: register.yml
|
- include_tasks: register.yml
|
||||||
when: inventory_hostname in groups['gnocchi-api']
|
when: inventory_hostname in groups['gnocchi-api']
|
||||||
|
|
||||||
|
@ -1,15 +1,4 @@
|
|||||||
---
|
---
|
||||||
- name: Ensuring config directory exists
|
|
||||||
file:
|
|
||||||
path: "{{ node_config_directory }}/{{ item }}"
|
|
||||||
state: "directory"
|
|
||||||
become: true
|
|
||||||
when: inventory_hostname in groups[item]
|
|
||||||
with_items:
|
|
||||||
- "gnocchi-api"
|
|
||||||
- "gnocchi-metricd"
|
|
||||||
- "gnocchi-statsd"
|
|
||||||
|
|
||||||
- name: Copy over ceph.conf file
|
- name: Copy over ceph.conf file
|
||||||
template:
|
template:
|
||||||
src: "{{ node_custom_config }}/gnocchi/ceph.conf"
|
src: "{{ node_custom_config }}/gnocchi/ceph.conf"
|
||||||
|
@ -1,10 +1,4 @@
|
|||||||
---
|
---
|
||||||
- name: Ensuring config directory exists
|
|
||||||
file:
|
|
||||||
path: "{{ node_config_directory }}/manila-share"
|
|
||||||
state: "directory"
|
|
||||||
become: true
|
|
||||||
|
|
||||||
- name: Copying over ceph.conf for manila
|
- name: Copying over ceph.conf for manila
|
||||||
merge_configs:
|
merge_configs:
|
||||||
sources:
|
sources:
|
||||||
|
@ -12,6 +12,20 @@
|
|||||||
- item.value.enabled | bool
|
- item.value.enabled | bool
|
||||||
with_dict: "{{ manila_services }}"
|
with_dict: "{{ manila_services }}"
|
||||||
|
|
||||||
|
- include_tasks: ceph.yml
|
||||||
|
when:
|
||||||
|
- enable_ceph | bool
|
||||||
|
- enable_ceph_mds | bool
|
||||||
|
- (enable_manila_backend_cephfs_native | bool) or (enable_manila_backend_cephfs_nfs | bool)
|
||||||
|
- inventory_hostname in groups['manila-share']
|
||||||
|
|
||||||
|
- include_tasks: external_ceph.yml
|
||||||
|
when:
|
||||||
|
- enable_ceph| bool == False
|
||||||
|
- enable_ceph_mds| bool == False
|
||||||
|
- (enable_manila_backend_cephfs_native | bool) or (enable_manila_backend_cephfs_nfs | bool)
|
||||||
|
- inventory_hostname in groups['manila-share']
|
||||||
|
|
||||||
- name: Check if policies shall be overwritten
|
- name: Check if policies shall be overwritten
|
||||||
local_action: stat path="{{ item }}"
|
local_action: stat path="{{ item }}"
|
||||||
run_once: True
|
run_once: True
|
||||||
|
@ -1,18 +1,4 @@
|
|||||||
---
|
---
|
||||||
- include_tasks: ceph.yml
|
|
||||||
when:
|
|
||||||
- enable_ceph | bool
|
|
||||||
- enable_ceph_mds | bool
|
|
||||||
- (enable_manila_backend_cephfs_native | bool) or (enable_manila_backend_cephfs_nfs | bool)
|
|
||||||
- inventory_hostname in groups['manila-share']
|
|
||||||
|
|
||||||
- include_tasks: external_ceph.yml
|
|
||||||
when:
|
|
||||||
- enable_ceph| bool == False
|
|
||||||
- enable_ceph_mds| bool == False
|
|
||||||
- (enable_manila_backend_cephfs_native | bool) or (enable_manila_backend_cephfs_nfs | bool)
|
|
||||||
- inventory_hostname in groups['manila-share']
|
|
||||||
|
|
||||||
- include_tasks: clone.yml
|
- include_tasks: clone.yml
|
||||||
when: manila_dev_mode | bool
|
when: manila_dev_mode | bool
|
||||||
|
|
||||||
|
@ -1,12 +1,4 @@
|
|||||||
---
|
---
|
||||||
- name: Ensuring config directory exists
|
|
||||||
file:
|
|
||||||
path: "{{ node_config_directory }}/manila-share"
|
|
||||||
state: "directory"
|
|
||||||
become: true
|
|
||||||
when:
|
|
||||||
- inventory_hostname in groups['manila-share']
|
|
||||||
|
|
||||||
- name: Copying over ceph.conf for manila
|
- name: Copying over ceph.conf for manila
|
||||||
template:
|
template:
|
||||||
src: "{{ node_custom_config }}/manila/ceph.conf"
|
src: "{{ node_custom_config }}/manila/ceph.conf"
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
mode: "0770"
|
mode: "0770"
|
||||||
become: true
|
become: true
|
||||||
with_items:
|
with_items:
|
||||||
- "nova-compute"
|
|
||||||
- "nova-libvirt/secrets"
|
- "nova-libvirt/secrets"
|
||||||
when: inventory_hostname in groups['compute']
|
when: inventory_hostname in groups['compute']
|
||||||
|
|
||||||
|
@ -24,6 +24,22 @@
|
|||||||
- item.value.enabled | bool
|
- item.value.enabled | bool
|
||||||
with_dict: "{{ nova_services }}"
|
with_dict: "{{ nova_services }}"
|
||||||
|
|
||||||
|
- include_tasks: ceph.yml
|
||||||
|
when:
|
||||||
|
- enable_ceph | bool and nova_backend == "rbd"
|
||||||
|
- inventory_hostname in groups['ceph-mon'] or
|
||||||
|
inventory_hostname in groups['compute'] or
|
||||||
|
inventory_hostname in groups['nova-api'] or
|
||||||
|
inventory_hostname in groups['nova-conductor'] or
|
||||||
|
inventory_hostname in groups['nova-consoleauth'] or
|
||||||
|
inventory_hostname in groups['nova-novncproxy'] or
|
||||||
|
inventory_hostname in groups['nova-scheduler']
|
||||||
|
|
||||||
|
- include_tasks: external_ceph.yml
|
||||||
|
when:
|
||||||
|
- not enable_ceph | bool and (nova_backend == "rbd" or cinder_backend_ceph | bool)
|
||||||
|
- inventory_hostname in groups['compute']
|
||||||
|
|
||||||
- name: Check if policies shall be overwritten
|
- name: Check if policies shall be overwritten
|
||||||
local_action: stat path="{{ item }}"
|
local_action: stat path="{{ item }}"
|
||||||
run_once: True
|
run_once: True
|
||||||
|
@ -1,20 +1,4 @@
|
|||||||
---
|
---
|
||||||
- include_tasks: ceph.yml
|
|
||||||
when:
|
|
||||||
- enable_ceph | bool and nova_backend == "rbd"
|
|
||||||
- inventory_hostname in groups['ceph-mon'] or
|
|
||||||
inventory_hostname in groups['compute'] or
|
|
||||||
inventory_hostname in groups['nova-api'] or
|
|
||||||
inventory_hostname in groups['nova-conductor'] or
|
|
||||||
inventory_hostname in groups['nova-consoleauth'] or
|
|
||||||
inventory_hostname in groups['nova-novncproxy'] or
|
|
||||||
inventory_hostname in groups['nova-scheduler']
|
|
||||||
|
|
||||||
- include_tasks: external_ceph.yml
|
|
||||||
when:
|
|
||||||
- not enable_ceph | bool and (nova_backend == "rbd" or cinder_backend_ceph | bool)
|
|
||||||
- inventory_hostname in groups['compute']
|
|
||||||
|
|
||||||
- include_tasks: register.yml
|
- include_tasks: register.yml
|
||||||
when: inventory_hostname in groups['nova-api']
|
when: inventory_hostname in groups['nova-api']
|
||||||
|
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
mode: "0770"
|
mode: "0770"
|
||||||
become: true
|
become: true
|
||||||
with_items:
|
with_items:
|
||||||
- "nova-compute"
|
|
||||||
- "nova-libvirt/secrets"
|
- "nova-libvirt/secrets"
|
||||||
when: inventory_hostname in groups['compute']
|
when: inventory_hostname in groups['compute']
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user