9ea1b06bfa
Service_providers config group is already configured in the neutron_vpnaas.conf. So, we only need to load the neutron_vpnaas.conf configuration file when the neutron_vpnaas_agent container starts, without having to duplicate the configuration. Change-Id: I7b78831325db4bbb263b2cc174e848ea7037ad0a
277 lines
13 KiB
YAML
277 lines
13 KiB
YAML
---
|
|
- name: Restart neutron-server container
|
|
vars:
|
|
service_name: "neutron-server"
|
|
service: "{{ neutron_services[service_name] }}"
|
|
config_json: "{{ neutron_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
neutron_conf: "{{ neutron_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
neutron_lbaas_conf: "{{ neutron_lbaas_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
neutron_vpnaas_conf: "{{ neutron_vpnaas_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
neutron_ml2_conf: "{{ neutron_ml2_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
policy_json: "{{ policy_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
neutron_server_container: "{{ check_neutron_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
kolla_docker:
|
|
action: "recreate_or_restart_container"
|
|
common_options: "{{ docker_common_options }}"
|
|
name: "{{ service.container_name }}"
|
|
image: "{{ service.image }}"
|
|
volumes: "{{ service.volumes }}"
|
|
privileged: "{{ service.privileged | default(False) }}"
|
|
when:
|
|
- action != "config"
|
|
- service.enabled | bool
|
|
- service.host_in_groups | bool
|
|
- config_json | changed
|
|
or neutron_conf | changed
|
|
or neutron_lbaas_conf | changed
|
|
or neutron_vpnaas_conf | changed
|
|
or neutron_ml2_conf | changed
|
|
or nsx_ini | changed
|
|
or policy_json | changed
|
|
or neutron_server_container | changed
|
|
|
|
- name: Restart neutron-openvswitch-agent container
|
|
vars:
|
|
service_name: "neutron-openvswitch-agent"
|
|
service: "{{ neutron_services[service_name] }}"
|
|
config_json: "{{ neutron_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
neutron_conf: "{{ neutron_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
neutron_ml2_conf: "{{ neutron_ml2_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
policy_json: "{{ policy_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
neutron_openvswitch_agent_container: "{{ check_neutron_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
kolla_docker:
|
|
action: "recreate_or_restart_container"
|
|
common_options: "{{ docker_common_options }}"
|
|
name: "{{ service.container_name }}"
|
|
image: "{{ service.image }}"
|
|
volumes: "{{ service.volumes }}"
|
|
privileged: "{{ service.privileged | default(False) }}"
|
|
when:
|
|
- action != "config"
|
|
- service.enabled | bool
|
|
- service.host_in_groups | bool
|
|
- config_json | changed
|
|
or neutron_conf | changed
|
|
or neutron_ml2_conf | changed
|
|
or policy_json | changed
|
|
or neutron_openvswitch_agent_container | changed
|
|
|
|
- name: Restart fake neutron-openvswitch-agent container
|
|
vars:
|
|
service_name: "neutron-openvswitch-agent"
|
|
service: "{{ neutron_services[service_name] }}"
|
|
config_json: "{{ neutron_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
neutron_conf: "{{ neutron_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
neutron_ml2_conf: "{{ neutron_ml2_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
policy_json: "{{ policy_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
neutron_openvswitch_agent_container: "{{ check_neutron_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
kolla_docker:
|
|
action: "recreate_or_restart_container"
|
|
common_options: "{{ docker_common_options }}"
|
|
name: "{{ service.container_name }}"
|
|
image: "{{ service.image }}"
|
|
volumes: "{{ service.volumes }}"
|
|
privileged: "{{ service.privileged | default(False) }}"
|
|
with_sequence: "start=1 end={{ num_nova_fake_per_node }}"
|
|
when:
|
|
- action != "config"
|
|
- enable_nova_fake | bool
|
|
- neutron_plugin_agent == "openvswitch"
|
|
- inventory_hostname in groups["compute"]
|
|
- fake_config_json | changed
|
|
or fake_neutron_conf | changed
|
|
or fake_neutron_ml2_conf_ini | changed
|
|
or check_fake_neutron_openvswitch_agent | changed
|
|
|
|
- name: Restart neutron-linuxbridge-agent container
|
|
vars:
|
|
service_name: "neutron-linuxbridge-agent"
|
|
service: "{{ neutron_services[service_name] }}"
|
|
config_json: "{{ neutron_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
neutron_conf: "{{ neutron_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
neutron_ml2_conf: "{{ neutron_ml2_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
policy_json: "{{ policy_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
neutron_linuxbridge_agent_container: "{{ check_neutron_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
kolla_docker:
|
|
action: "recreate_or_restart_container"
|
|
common_options: "{{ docker_common_options }}"
|
|
name: "{{ service.container_name }}"
|
|
image: "{{ service.image }}"
|
|
environment: "{{ service.environment }}"
|
|
volumes: "{{ service.volumes }}"
|
|
privileged: "{{ service.privileged | default(False) }}"
|
|
when:
|
|
- action != "config"
|
|
- service.enabled | bool
|
|
- service.host_in_groups | bool
|
|
- config_json | changed
|
|
or neutron_conf | changed
|
|
or neutron_ml2_conf | changed
|
|
or policy_json | changed
|
|
or neutron_linuxbridge_agent_container | changed
|
|
|
|
- name: Restart neutron-dhcp-agent container
|
|
vars:
|
|
service_name: "neutron-dhcp-agent"
|
|
service: "{{ neutron_services[service_name] }}"
|
|
config_json: "{{ neutron_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
neutron_conf: "{{ neutron_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
policy_json: "{{ policy_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
neutron_dhcp_agent_container: "{{ check_neutron_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
kolla_docker:
|
|
action: "recreate_or_restart_container"
|
|
common_options: "{{ docker_common_options }}"
|
|
name: "{{ service.container_name }}"
|
|
image: "{{ service.image }}"
|
|
volumes: "{{ service.volumes }}"
|
|
privileged: "{{ service.privileged | default(False) }}"
|
|
when:
|
|
- action != "config"
|
|
- service.enabled | bool
|
|
- service.host_in_groups | bool
|
|
- config_json | changed
|
|
or neutron_conf | changed
|
|
or dhcp_agent_ini | changed
|
|
or dnsmasq_conf | changed
|
|
or policy_json | changed
|
|
or neutron_dhcp_agent_container | changed
|
|
|
|
- name: Restart neutron-l3-agent container
|
|
vars:
|
|
service_name: "neutron-l3-agent"
|
|
service: "{{ neutron_services[service_name] }}"
|
|
config_json: "{{ neutron_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
neutron_conf: "{{ neutron_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
neutron_l3_agent_ini: "{{ neutron_l3_agent_inis.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
neutron_fwaas_driver_ini: "{{ neutron_fwaas_driver_inis.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
|
|
policy_json: "{{ policy_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
neutron_l3_agent_container: "{{ check_neutron_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
kolla_docker:
|
|
action: "recreate_or_restart_container"
|
|
common_options: "{{ docker_common_options }}"
|
|
name: "{{ service.container_name }}"
|
|
image: "{{ service.image }}"
|
|
volumes: "{{ service.volumes }}"
|
|
privileged: "{{ service.privileged | default(False) }}"
|
|
when:
|
|
- action != "config"
|
|
- service.enabled | bool
|
|
- service.host_in_groups | bool
|
|
- config_json | changed
|
|
or neutron_conf | changed
|
|
or neutron_l3_agent_ini | changed
|
|
or neutron_fwaas_driver_ini | changed
|
|
or policy_json | changed
|
|
or neutron_l3_agent_wrapper | changed
|
|
or neutron_l3_agent_container | changed
|
|
|
|
- name: Restart neutron-lbaas-agent container
|
|
vars:
|
|
service_name: "neutron-lbaas-agent"
|
|
service: "{{ neutron_services[service_name] }}"
|
|
config_json: "{{ neutron_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
neutron_conf: "{{ neutron_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
neutron_lbaas_conf: "{{ neutron_lbaas_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
policy_json: "{{ policy_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
neutron_lbaas_agent_container: "{{ check_neutron_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
kolla_docker:
|
|
action: "recreate_or_restart_container"
|
|
common_options: "{{ docker_common_options }}"
|
|
name: "{{ service.container_name }}"
|
|
image: "{{ service.image }}"
|
|
volumes: "{{ service.volumes }}"
|
|
privileged: "{{ service.privileged | default(False) }}"
|
|
when:
|
|
- action != "config"
|
|
- service.enabled | bool
|
|
- service.host_in_groups | bool
|
|
- config_json | changed
|
|
or neutron_conf | changed
|
|
or neutron_lbaas_conf | changed
|
|
or neutron_lbaas_agent_ini | changed
|
|
or policy_json | changed
|
|
or neutron_lbaas_agent_container | changed
|
|
|
|
- name: Restart neutron-metadata-agent container
|
|
vars:
|
|
service_name: "neutron-metadata-agent"
|
|
service: "{{ neutron_services[service_name] }}"
|
|
config_json: "{{ neutron_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
neutron_conf: "{{ neutron_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
policy_json: "{{ policy_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
neutron_metadata_agent_container: "{{ check_neutron_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
kolla_docker:
|
|
action: "recreate_or_restart_container"
|
|
common_options: "{{ docker_common_options }}"
|
|
name: "{{ service.container_name }}"
|
|
image: "{{ service.image }}"
|
|
volumes: "{{ service.volumes }}"
|
|
privileged: "{{ service.privileged | default(False) }}"
|
|
when:
|
|
- action != "config"
|
|
- service.enabled | bool
|
|
- service.host_in_groups | bool
|
|
- config_json | changed
|
|
or neutron_conf | changed
|
|
or neutron_metadata_agent_ini | changed
|
|
or policy_json | changed
|
|
or neutron_metadata_agent_container | changed
|
|
|
|
- name: Restart neutron-vpnaas-agent container
|
|
vars:
|
|
service_name: "neutron-vpnaas-agent"
|
|
service: "{{ neutron_services[service_name] }}"
|
|
config_json: "{{ neutron_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
neutron_conf: "{{ neutron_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
neutron_vpnaas_conf: "{{ neutron_vpnaas_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
neutron_l3_agent_ini: "{{ neutron_l3_agent_inis.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
neutron_fwaas_driver_ini: "{{ neutron_fwaas_driver_inis.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
policy_json: "{{ policy_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
neutron_vpnaas_agent_container: "{{ check_neutron_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
kolla_docker:
|
|
action: "recreate_or_restart_container"
|
|
common_options: "{{ docker_common_options }}"
|
|
name: "{{ service.container_name }}"
|
|
image: "{{ service.image }}"
|
|
volumes: "{{ service.volumes }}"
|
|
privileged: "{{ service.privileged | default(False) }}"
|
|
when:
|
|
- action != "config"
|
|
- service.enabled | bool
|
|
- service.host_in_groups | bool
|
|
- config_json | changed
|
|
or neutron_conf | changed
|
|
or neutron_vpnaas_conf | changed
|
|
or neutron_l3_agent_ini | changed
|
|
or neutron_fwaas_driver_ini | changed
|
|
or neutron_vpnaas_agent_ini | changed
|
|
or policy_json | changed
|
|
or neutron_vpnaas_agent_wrapper | changed
|
|
or neutron_vpnaas_agent_container | changed
|
|
|
|
- name: Restart neutron-bgp-dragent container
|
|
vars:
|
|
service_name: "neutron-bgp-dragent"
|
|
service: "{{ neutron_services[service_name] }}"
|
|
config_json: "{{ neutron_config_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
neutron_conf: "{{ neutron_confs.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
policy_json: "{{ policy_jsons.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
neutron_bgp_dragent_container: "{{ check_neutron_containers.results|selectattr('item.key', 'equalto', service_name)|first }}"
|
|
kolla_docker:
|
|
action: "recreate_or_restart_container"
|
|
common_options: "{{ docker_common_options }}"
|
|
name: "{{ service.container_name }}"
|
|
image: "{{ service.image }}"
|
|
volumes: "{{ service.volumes }}"
|
|
privileged: "{{ service.privileged | default(False) }}"
|
|
when:
|
|
- action != "config"
|
|
- service.enabled | bool
|
|
- service.host_in_groups | bool
|
|
- config_json | changed
|
|
or neutron_conf | changed
|
|
or neutron_bgp_dragent_ini | changed
|
|
or policy_json | changed
|
|
or neutron_bgp_dragent_container | changed
|