1efdf4574d
The main reason for this change is to allow the DinD stuff to work. It has limited use outside of that use case, but it may still be useful to others in the future. Change-Id: Ib3a4639cfb3fc0d378d33fc8b9ff8eb597f818ab Partially-Implements: blueprint multinode-gate
204 lines
9.4 KiB
YAML
204 lines
9.4 KiB
YAML
---
|
|
- name: Allowing IP forwarding on network node
|
|
sysctl: name="net.ipv4.ip_forward" value=1 sysctl_set=yes
|
|
when:
|
|
- set_sysctl | bool
|
|
- inventory_hostname in groups['neutron-agents']
|
|
|
|
- name: Disabling reverse path filter on network node
|
|
sysctl: name="net.ipv4.conf.{{ item }}.rp_filter" value=0 sysctl_set=yes
|
|
with_items:
|
|
- "all"
|
|
- "default"
|
|
when:
|
|
- set_sysctl | bool
|
|
- inventory_hostname in groups['neutron-agents']
|
|
|
|
- include: ../../config.yml
|
|
vars:
|
|
service_name: "neutron-server"
|
|
config_source:
|
|
- "roles/{{ project_name }}/templates/neutron.conf.j2"
|
|
- "/etc/kolla/config/global.conf"
|
|
- "/etc/kolla/config/database.conf"
|
|
- "/etc/kolla/config/messaging.conf"
|
|
- "/etc/kolla/config/{{ project_name }}.conf"
|
|
- "/etc/kolla/config/{{ project_name }}/{{ service_name }}.conf"
|
|
config_template_dest:
|
|
- "{{ node_templates_directory }}/{{ service_name }}/{{ project_name }}.conf_minimal"
|
|
- "{{ node_templates_directory }}/{{ service_name }}/{{ project_name }}.conf_global"
|
|
- "{{ node_templates_directory }}/{{ service_name }}/{{ project_name }}.conf_database"
|
|
- "{{ node_templates_directory }}/{{ service_name }}/{{ project_name }}.conf_messaging"
|
|
- "{{ node_templates_directory }}/{{ service_name }}/{{ project_name }}.conf_augment"
|
|
- "{{ node_templates_directory }}/{{ service_name }}/{{ service_name }}.conf_augment"
|
|
config_dest: "{{ node_config_directory }}/{{ service_name }}/neutron.conf"
|
|
when: inventory_hostname in groups['neutron-server']
|
|
|
|
- include: ../../config.yml
|
|
vars:
|
|
service_name: "neutron-server"
|
|
config_source:
|
|
- "roles/{{ project_name }}/templates/ml2_conf.ini.j2"
|
|
- "/etc/kolla/config/{{ project_name }}/ml2_conf.ini"
|
|
config_template_dest:
|
|
- "{{ node_templates_directory }}/{{ service_name }}/ml2_conf.ini_minimal"
|
|
- "{{ node_templates_directory }}/{{ service_name }}/ml2_conf.ini_augment"
|
|
config_dest: "{{ node_config_directory }}/{{ service_name }}/ml2_conf.ini"
|
|
when: inventory_hostname in groups['neutron-server']
|
|
|
|
- include: ../../config.yml
|
|
vars:
|
|
service_name: "neutron-agents"
|
|
config_source:
|
|
- "roles/{{ project_name }}/templates/neutron.conf.j2"
|
|
- "/etc/kolla/config/global.conf"
|
|
- "/etc/kolla/config/database.conf"
|
|
- "/etc/kolla/config/messaging.conf"
|
|
- "/etc/kolla/config/{{ project_name }}.conf"
|
|
- "/etc/kolla/config/{{ project_name }}/{{ service_name }}.conf"
|
|
config_template_dest:
|
|
- "{{ node_templates_directory }}/{{ service_name }}/{{ project_name }}.conf_minimal"
|
|
- "{{ node_templates_directory }}/{{ service_name }}/{{ project_name }}.conf_global"
|
|
- "{{ node_templates_directory }}/{{ service_name }}/{{ project_name }}.conf_database"
|
|
- "{{ node_templates_directory }}/{{ service_name }}/{{ project_name }}.conf_messaging"
|
|
- "{{ node_templates_directory }}/{{ service_name }}/{{ project_name }}.conf_augment"
|
|
- "{{ node_templates_directory }}/{{ service_name }}/{{ service_name }}.conf_augment"
|
|
config_dest: "{{ node_config_directory }}/{{ service_name }}/neutron.conf"
|
|
when: inventory_hostname in groups['neutron-agents']
|
|
|
|
- include: ../../config.yml
|
|
vars:
|
|
service_name: "neutron-agents"
|
|
config_source:
|
|
- "roles/{{ project_name }}/templates/dhcp_agent.ini.j2"
|
|
- "/etc/kolla/config/{{ project_name }}/dhcp_agent.ini"
|
|
config_template_dest:
|
|
- "{{ node_templates_directory }}/{{ service_name }}/dhcp_agent.ini_minimal"
|
|
- "{{ node_templates_directory }}/{{ service_name }}/dhcp_agent.ini_augment"
|
|
config_dest: "{{ node_config_directory }}/{{ service_name }}/dhcp_agent.ini"
|
|
when: inventory_hostname in groups['neutron-agents']
|
|
|
|
- name: Copying over config(s)
|
|
template:
|
|
src: "dnsmasq.conf.j2"
|
|
dest: "{{ node_config_directory }}/neutron-agents/dnsmasq.conf"
|
|
when: inventory_hostname in groups['neutron-agents']
|
|
|
|
- include: ../../config.yml
|
|
vars:
|
|
service_name: "neutron-agents"
|
|
config_source:
|
|
- "roles/{{ project_name }}/templates/l3_agent.ini.j2"
|
|
- "/etc/kolla/config/{{ project_name }}/l3_agent.ini"
|
|
config_template_dest:
|
|
- "{{ node_templates_directory }}/{{ service_name }}/l3_agent.ini_minimal"
|
|
- "{{ node_templates_directory }}/{{ service_name }}/l3_agent.ini_augment"
|
|
config_dest: "{{ node_config_directory }}/{{ service_name }}/l3_agent.ini"
|
|
when: inventory_hostname in groups['neutron-agents']
|
|
|
|
- include: ../../config.yml
|
|
vars:
|
|
service_name: "neutron-agents"
|
|
config_source:
|
|
- "roles/{{ project_name }}/templates/metadata_agent.ini.j2"
|
|
- "/etc/kolla/config/{{ project_name }}/metadata_agent.ini"
|
|
config_template_dest:
|
|
- "{{ node_templates_directory }}/{{ service_name }}/metadata_agent.ini_minimal"
|
|
- "{{ node_templates_directory }}/{{ service_name }}/metadata_agent.ini_augment"
|
|
config_dest: "{{ node_config_directory }}/{{ service_name }}/metadata_agent.ini"
|
|
when: inventory_hostname in groups['neutron-agents']
|
|
|
|
- include: ../../config.yml
|
|
vars:
|
|
service_name: "neutron-agents"
|
|
config_source:
|
|
- "roles/{{ project_name }}/templates/ml2_conf.ini.j2"
|
|
- "/etc/kolla/config/{{ project_name }}/ml2_conf.ini"
|
|
config_template_dest:
|
|
- "{{ node_templates_directory }}/{{ service_name }}/ml2_conf.ini_minimal"
|
|
- "{{ node_templates_directory }}/{{ service_name }}/ml2_conf.ini_augment"
|
|
config_dest: "{{ node_config_directory }}/{{ service_name }}/ml2_conf.ini"
|
|
when: inventory_hostname in groups['neutron-agents']
|
|
|
|
- include: ../../config.yml
|
|
vars:
|
|
service_name: "neutron-{{ neutron_plugin_agent }}-agent"
|
|
config_source:
|
|
- "roles/{{ project_name }}/templates/neutron.conf.j2"
|
|
- "/etc/kolla/config/global.conf"
|
|
- "/etc/kolla/config/database.conf"
|
|
- "/etc/kolla/config/messaging.conf"
|
|
- "/etc/kolla/config/{{ project_name }}.conf"
|
|
- "/etc/kolla/config/{{ project_name }}/{{ service_name }}.conf"
|
|
config_template_dest:
|
|
- "{{ node_templates_directory }}/{{ service_name }}/{{ project_name }}.conf_minimal"
|
|
- "{{ node_templates_directory }}/{{ service_name }}/{{ project_name }}.conf_global"
|
|
- "{{ node_templates_directory }}/{{ service_name }}/{{ project_name }}.conf_database"
|
|
- "{{ node_templates_directory }}/{{ service_name }}/{{ project_name }}.conf_messaging"
|
|
- "{{ node_templates_directory }}/{{ service_name }}/{{ project_name }}.conf_augment"
|
|
- "{{ node_templates_directory }}/{{ service_name }}/{{ service_name }}.conf_augment"
|
|
config_dest: "{{ node_config_directory }}/{{ service_name }}/neutron.conf"
|
|
when: (inventory_hostname in groups['compute'] or inventory_hostname in groups['neutron-agents'])
|
|
|
|
- include: ../../config.yml
|
|
vars:
|
|
service_name: "neutron-{{ neutron_plugin_agent }}-agent"
|
|
config_source:
|
|
- "roles/{{ project_name }}/templates/ml2_conf.ini.j2"
|
|
- "/etc/kolla/config/{{ project_name }}/ml2_conf.ini"
|
|
config_template_dest:
|
|
- "{{ node_templates_directory }}/{{ service_name }}/ml2_conf.ini_minimal"
|
|
- "{{ node_templates_directory }}/{{ service_name }}/ml2_conf.ini_augment"
|
|
config_dest: "{{ node_config_directory }}/{{ service_name }}/ml2_conf.ini"
|
|
when: (inventory_hostname in groups['compute'] or inventory_hostname in groups['neutron-agents'])
|
|
|
|
- name: Copying Neutron Agents JSON configuration file
|
|
template:
|
|
src: "roles/neutron/templates/neutron-agents.json.j2"
|
|
dest: "{{ node_config_directory }}/neutron-agents/config.json"
|
|
when: inventory_hostname in groups['neutron-agents']
|
|
|
|
- name: Copying Neutron Server JSON configuration file
|
|
template:
|
|
src: "roles/neutron/templates/neutron-server.json.j2"
|
|
dest: "{{ node_config_directory }}/neutron-server/config.json"
|
|
when: inventory_hostname in groups['neutron-server']
|
|
|
|
- name: Copying Neutron OpenVSwitch JSON configuration file
|
|
template:
|
|
src: "roles/neutron/templates/neutron-openvswitch-agent.json.j2"
|
|
dest: "{{ node_config_directory }}/neutron-openvswitch-agent/config.json"
|
|
when: (inventory_hostname in groups['compute'] or inventory_hostname in groups['neutron-agents'])
|
|
and neutron_plugin_agent == "openvswitch"
|
|
|
|
- name: Ensuring config directories exists
|
|
file:
|
|
path: "{{ node_config_directory }}/{{ item }}"
|
|
state: "directory"
|
|
with_items:
|
|
- "openvswitch-db-server"
|
|
- "openvswitch-vswitchd"
|
|
when: (inventory_hostname in groups['compute'] or inventory_hostname in groups['neutron-agents'])
|
|
and neutron_plugin_agent == "openvswitch"
|
|
|
|
- name: Copying openvswitch-db-server JSON configuration file
|
|
template:
|
|
src: "openvswitch-db-server.json.j2"
|
|
dest: "{{ node_config_directory }}/openvswitch-db-server/config.json"
|
|
when: (inventory_hostname in groups['compute'] or inventory_hostname in groups['neutron-agents'])
|
|
and neutron_plugin_agent == "openvswitch"
|
|
|
|
- name: Copying openvswitch-vswitchd JSON configuration file
|
|
template:
|
|
src: "openvswitch-vswitchd.json.j2"
|
|
dest: "{{ node_config_directory }}/openvswitch-vswitchd/config.json"
|
|
when: (inventory_hostname in groups['compute'] or inventory_hostname in groups['neutron-agents'])
|
|
and neutron_plugin_agent == "openvswitch"
|
|
|
|
- name: Copying Neutron Linuxbridge JSON configuration file
|
|
template:
|
|
src: "roles/neutron/templates/neutron-server.json.j2"
|
|
dest: "{{ node_config_directory }}/neutron-linuxbridge-agent/config.json"
|
|
when: (inventory_hostname in groups['compute'] or inventory_hostname in groups['neutron-agents'])
|
|
and neutron_plugin_agent == "linuxbridge"
|