adds the config_template to neutron
The change modifies the neutron 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: Ia9e4acdb86c1c61db182771658d6a175a4c45b38
This commit is contained in:
parent
d4255d0bd2
commit
dfac238126
@ -271,3 +271,15 @@ neutron_service_names:
|
|||||||
- neutron-metadata-agent
|
- neutron-metadata-agent
|
||||||
- neutron-metering-agent
|
- neutron-metering-agent
|
||||||
- neutron-server
|
- neutron-server
|
||||||
|
|
||||||
|
## Tunable overrides
|
||||||
|
neutron_neutron_conf_overrides: {}
|
||||||
|
neutron_ml2_conf_ini_overrides: {}
|
||||||
|
neutron_dhcp_agent_ini_overrides: {}
|
||||||
|
neutron_api_paste_ini_overrides: {}
|
||||||
|
neutron_rootwrap_conf_overrides: {}
|
||||||
|
neutron_policy_overrides: {}
|
||||||
|
neutron_dnsmasq_neutron_conf_overrides: {}
|
||||||
|
neutron_l3_agent_ini_overrides: {}
|
||||||
|
neutron_metadata_agent_ini_overrides: {}
|
||||||
|
neutron_metering_agent_ini_overrides: {}
|
||||||
|
@ -26,32 +26,71 @@
|
|||||||
tags:
|
tags:
|
||||||
- neutron-config
|
- neutron-config
|
||||||
|
|
||||||
- name: Generate neutron Config
|
- name: Copy neutron config
|
||||||
template:
|
config_template:
|
||||||
src: "{{ item.src }}"
|
src: "{{ item.src }}"
|
||||||
dest: "{{ item.dest }}"
|
dest: "{{ item.dest }}"
|
||||||
owner: "{{ neutron_system_user_name }}"
|
owner: "{{ neutron_system_user_name }}"
|
||||||
group: "{{ neutron_system_group_name }}"
|
group: "{{ neutron_system_group_name }}"
|
||||||
|
mode: "0644"
|
||||||
|
config_overrides: "{{ item.config_overrides }}"
|
||||||
|
config_type: "{{ item.config_type }}"
|
||||||
with_items:
|
with_items:
|
||||||
- { src: "neutron.conf.j2", dest: "/etc/neutron/neutron.conf" }
|
- src: "neutron.conf.j2"
|
||||||
- { src: "plugins/ml2/ml2_conf.ini.j2", dest: "/etc/neutron/plugins/ml2/ml2_conf.ini" }
|
dest: "/etc/neutron/neutron.conf"
|
||||||
|
config_overrides: "{{ neutron_neutron_conf_overrides }}"
|
||||||
|
config_type: "ini"
|
||||||
|
- src: "plugins/ml2/ml2_conf.ini.j2"
|
||||||
|
dest: "/etc/neutron/plugins/ml2/ml2_conf.ini"
|
||||||
|
config_overrides: "{{ neutron_ml2_conf_ini_overrides }}"
|
||||||
|
config_type: "ini"
|
||||||
|
- src: "api-paste.ini.j2"
|
||||||
|
dest: "/etc/neutron/api-paste.ini"
|
||||||
|
config_overrides: "{{ neutron_api_paste_ini_overrides }}"
|
||||||
|
config_type: "ini"
|
||||||
|
- src: "rootwrap.conf.j2"
|
||||||
|
dest: "/etc/neutron/rootwrap.conf"
|
||||||
|
config_overrides: "{{ neutron_rootwrap_conf_overrides }}"
|
||||||
|
config_type: "ini"
|
||||||
|
- src: "policy.json.j2"
|
||||||
|
dest: "/etc/neutron/policy.json"
|
||||||
|
config_overrides: "{{ neutron_policy_overrides }}"
|
||||||
|
config_type: "json"
|
||||||
notify:
|
notify:
|
||||||
- Restart neutron services
|
- Restart neutron services
|
||||||
tags:
|
tags:
|
||||||
- neutron-config
|
- neutron-config
|
||||||
|
|
||||||
- name: Generate neutron agent only Config
|
- name: Generate neutron agent only Config
|
||||||
template:
|
config_template:
|
||||||
src: "{{ item.src }}"
|
src: "{{ item.src }}"
|
||||||
dest: "{{ item.dest }}"
|
dest: "{{ item.dest }}"
|
||||||
owner: "{{ neutron_system_user_name }}"
|
owner: "{{ neutron_system_user_name }}"
|
||||||
group: "{{ neutron_system_group_name }}"
|
group: "{{ neutron_system_group_name }}"
|
||||||
|
mode: "0644"
|
||||||
|
config_overrides: "{{ item.config_overrides }}"
|
||||||
|
config_type: "{{ item.config_type }}"
|
||||||
with_items:
|
with_items:
|
||||||
- { src: "dhcp_agent.ini.j2", dest: "/etc/neutron/dhcp_agent.ini" }
|
- src: "dhcp_agent.ini.j2"
|
||||||
- { src: "dnsmasq-neutron.conf.j2", dest: "/etc/neutron/dnsmasq-neutron.conf" }
|
dest: "/etc/neutron/dhcp_agent.ini"
|
||||||
- { src: "l3_agent.ini.j2", dest: "/etc/neutron/l3_agent.ini" }
|
config_overrides: "{{ neutron_dhcp_agent_ini_overrides }}"
|
||||||
- { src: "metadata_agent.ini.j2", dest: "/etc/neutron/metadata_agent.ini" }
|
config_type: "ini"
|
||||||
- { src: "metering_agent.ini.j2", dest: "/etc/neutron/metering_agent.ini" }
|
- src: "dnsmasq-neutron.conf.j2"
|
||||||
|
dest: "/etc/neutron/dnsmasq-neutron.conf"
|
||||||
|
config_overrides: "{{ neutron_dnsmasq_neutron_conf_overrides }}"
|
||||||
|
config_type: "ini"
|
||||||
|
- src: "l3_agent.ini.j2"
|
||||||
|
dest: "/etc/neutron/l3_agent.ini"
|
||||||
|
config_overrides: "{{ neutron_l3_agent_ini_overrides }}"
|
||||||
|
config_type: "ini"
|
||||||
|
- src: "metadata_agent.ini.j2"
|
||||||
|
dest: "/etc/neutron/metadata_agent.ini"
|
||||||
|
config_overrides: "{{ neutron_metadata_agent_ini_overrides }}"
|
||||||
|
config_type: "ini"
|
||||||
|
- src: "metering_agent.ini.j2"
|
||||||
|
dest: "/etc/neutron/metering_agent.ini"
|
||||||
|
config_overrides: "{{ neutron_metering_agent_ini_overrides }}"
|
||||||
|
config_type: "ini"
|
||||||
notify:
|
notify:
|
||||||
- Restart neutron services
|
- Restart neutron services
|
||||||
when: >
|
when: >
|
||||||
@ -66,8 +105,6 @@
|
|||||||
owner: "{{ neutron_system_user_name }}"
|
owner: "{{ neutron_system_user_name }}"
|
||||||
group: "{{ neutron_system_group_name }}"
|
group: "{{ neutron_system_group_name }}"
|
||||||
with_items:
|
with_items:
|
||||||
- { src: "api-paste.ini", dest: "/etc/neutron/api-paste.ini" }
|
|
||||||
- { src: "rootwrap.conf", dest: "/etc/neutron/rootwrap.conf" }
|
|
||||||
- { src: "rootwrap.d/debug.filters", dest: "/etc/neutron/rootwrap.d/debug.filters" }
|
- { src: "rootwrap.d/debug.filters", dest: "/etc/neutron/rootwrap.d/debug.filters" }
|
||||||
- { src: "rootwrap.d/dhcp.filters", dest: "/etc/neutron/rootwrap.d/dhcp.filters" }
|
- { src: "rootwrap.d/dhcp.filters", dest: "/etc/neutron/rootwrap.d/dhcp.filters" }
|
||||||
- { src: "rootwrap.d/ipset-firewall.filters", dest: "/etc/neutron/rootwrap.d/ipset-firewall.filters" }
|
- { src: "rootwrap.d/ipset-firewall.filters", dest: "/etc/neutron/rootwrap.d/ipset-firewall.filters" }
|
||||||
@ -85,20 +122,6 @@
|
|||||||
tags:
|
tags:
|
||||||
- neutron-config
|
- neutron-config
|
||||||
|
|
||||||
- name: Apply updates to Policy file
|
|
||||||
config_template:
|
|
||||||
src: "policy.json"
|
|
||||||
dest: "/etc/neutron/policy.json"
|
|
||||||
owner: "{{ neutron_system_user_name }}"
|
|
||||||
group: "{{ neutron_system_group_name }}"
|
|
||||||
mode: "0644"
|
|
||||||
config_overrides: "{{ neutron_policy_overrides|default({}) }}"
|
|
||||||
config_type: "json"
|
|
||||||
notify:
|
|
||||||
- Restart neutron services
|
|
||||||
tags:
|
|
||||||
- neutron-config
|
|
||||||
|
|
||||||
- name: Drop iptables checksum fix
|
- name: Drop iptables checksum fix
|
||||||
copy:
|
copy:
|
||||||
src: "post-up-checksum-rules"
|
src: "post-up-checksum-rules"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user