
A few sysctl values are required for networking to work. All of them are documented at docs.openstack.org and while some of them are the defaults on systems, they should be explicitly set since networking will break without them set. Change-Id: I4507eb2602e52eeab61bdceea4c94b1c35696a7d Closes-Bug: #1482794
200 lines
9.3 KiB
YAML
200 lines
9.3 KiB
YAML
---
|
|
- name: Allowing IP forwarding on network node
|
|
sysctl: name="net.ipv4.ip_forward" value=1 sysctl_set=yes
|
|
when: inventory_hostname in groups['neutron-agents']
|
|
|
|
- name: Disabling reverse path filter on network node
|
|
sysctl: name="net.ipv4.{{ item }}.rp_filter" value=0 sysctl_set=yes
|
|
with_items:
|
|
- "all"
|
|
- "default"
|
|
when: 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-server']
|
|
|
|
- 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"
|