Adds the config_template to cinder
The change modifies the cinder template tasks such that it's now using the config_template action plugin. This change will make so that config files can be dynamically updated, by a deployer, at run time, without requiring the need to modify the in tree templates or defaults. Partially implements: blueprint tunable-openstack-configuration Change-Id: I463bbd3e10895dc2e7788346493f78bc46e5f26e
This commit is contained in:
parent
ee6a360904
commit
2de509d108
@ -222,3 +222,9 @@ cinder_service_names:
|
|||||||
- cinder-scheduler
|
- cinder-scheduler
|
||||||
- cinder-volume
|
- cinder-volume
|
||||||
- cinder-backup
|
- cinder-backup
|
||||||
|
|
||||||
|
## Tunable overrides
|
||||||
|
cinder_policy_overrides: {}
|
||||||
|
cinder_rootwrap_conf_overrides: {}
|
||||||
|
cinder_api_paste_ini_overrides: {}
|
||||||
|
cinder_cinder_conf_overrides: {}
|
||||||
|
@ -13,15 +13,32 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
- name: Generate cinder configs
|
- name: Copy cinder configs
|
||||||
template:
|
config_template:
|
||||||
src: "{{ item.src }}"
|
src: "{{ item.src }}"
|
||||||
dest: "{{ item.dest }}"
|
dest: "{{ item.dest }}"
|
||||||
owner: "{{ cinder_system_user_name }}"
|
owner: "{{ cinder_system_user_name }}"
|
||||||
group: "{{ cinder_system_group_name }}"
|
group: "{{ cinder_system_group_name }}"
|
||||||
|
mode: "0644"
|
||||||
|
config_overrides: "{{ item.config_overrides }}"
|
||||||
|
config_type: "{{ item.config_type }}"
|
||||||
with_items:
|
with_items:
|
||||||
- { src: "cinder.conf.j2", dest: "/etc/cinder/cinder.conf" }
|
- src: "cinder.conf.j2"
|
||||||
- { src: "api-paste.ini.j2", dest: "/etc/cinder/api-paste.ini" }
|
dest: "/etc/cinder/cinder.conf"
|
||||||
|
config_overrides: "{{ cinder_cinder_conf_overrides }}"
|
||||||
|
config_type: "ini"
|
||||||
|
- src: "api-paste.ini.j2"
|
||||||
|
dest: "/etc/cinder/api-paste.ini"
|
||||||
|
config_overrides: "{{ cinder_api_paste_ini_overrides }}"
|
||||||
|
config_type: "ini"
|
||||||
|
- src: "rootwrap.conf.j2"
|
||||||
|
dest: "/etc/cinder/rootwrap.conf"
|
||||||
|
config_overrides: "{{ cinder_rootwrap_conf_overrides }}"
|
||||||
|
config_type: "ini"
|
||||||
|
- src: "policy.json"
|
||||||
|
dest: "/etc/cinder/policy.json"
|
||||||
|
config_overrides: "{{ cinder_policy_overrides }}"
|
||||||
|
config_type: "json"
|
||||||
notify:
|
notify:
|
||||||
- Restart cinder services
|
- Restart cinder services
|
||||||
tags:
|
tags:
|
||||||
@ -35,21 +52,6 @@
|
|||||||
group: "{{ cinder_system_group_name }}"
|
group: "{{ cinder_system_group_name }}"
|
||||||
with_items:
|
with_items:
|
||||||
- { src: "volume.filters", dest: "/etc/cinder/rootwrap.d/volume.filters" }
|
- { src: "volume.filters", dest: "/etc/cinder/rootwrap.d/volume.filters" }
|
||||||
- { src: "rootwrap.conf", dest: "/etc/cinder/rootwrap.conf" }
|
|
||||||
notify:
|
|
||||||
- Restart cinder services
|
|
||||||
tags:
|
|
||||||
- cinder-config
|
|
||||||
|
|
||||||
- name: Apply updates to Policy file
|
|
||||||
config_template:
|
|
||||||
src: "policy.json"
|
|
||||||
dest: "/etc/cinder/policy.json"
|
|
||||||
owner: "{{ cinder_system_user_name }}"
|
|
||||||
group: "{{ cinder_system_group_name }}"
|
|
||||||
mode: "0644"
|
|
||||||
config_overrides: "{{ cinder_policy_overrides|default({}) }}"
|
|
||||||
config_type: "json"
|
|
||||||
notify:
|
notify:
|
||||||
- Restart cinder services
|
- Restart cinder services
|
||||||
tags:
|
tags:
|
||||||
|
Loading…
Reference in New Issue
Block a user