diff --git a/ansible/roles/neutron/tasks/bootstrap.yml b/ansible/roles/neutron/tasks/bootstrap.yml index 45821fa681..30c9006bde 100644 --- a/ansible/roles/neutron/tasks/bootstrap.yml +++ b/ansible/roles/neutron/tasks/bootstrap.yml @@ -35,22 +35,5 @@ run_once: True delegate_to: "{{ groups['neutron-server'][0] }}" -- name: Running Neutron bootstrap container - kolla_docker: - action: "start_container" - common_options: "{{ docker_common_options }}" - detach: False - environment: - KOLLA_BOOTSTRAP: - KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}" - image: "{{ neutron_server_image_full }}" - labels: - BOOTSTRAP: - name: "bootstrap_neutron" - restart_policy: "never" - volumes: - - "{{ node_config_directory }}/neutron-server/:{{ container_config_directory }}/:ro" - - "kolla_logs:/var/log/kolla/" - run_once: True - delegate_to: "{{ groups['neutron-server'][0] }}" +- include: bootstrap_service.yml when: database_created diff --git a/ansible/roles/neutron/tasks/bootstrap_service.yml b/ansible/roles/neutron/tasks/bootstrap_service.yml new file mode 100644 index 0000000000..6eb6c92180 --- /dev/null +++ b/ansible/roles/neutron/tasks/bootstrap_service.yml @@ -0,0 +1,19 @@ +--- +- name: Running Neutron bootstrap container + kolla_docker: + action: "start_container" + common_options: "{{ docker_common_options }}" + detach: False + environment: + KOLLA_BOOTSTRAP: + KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}" + image: "{{ neutron_server_image_full }}" + labels: + BOOTSTRAP: + name: "bootstrap_neutron" + restart_policy: "never" + volumes: + - "{{ node_config_directory }}/neutron-server/:{{ container_config_directory }}/:ro" + - "kolla_logs:/var/log/kolla/" + run_once: True + delegate_to: "{{ groups['neutron-server'][0] }}" diff --git a/ansible/roles/neutron/tasks/upgrade.yml b/ansible/roles/neutron/tasks/upgrade.yml index ed97d539c0..08f57269df 100644 --- a/ansible/roles/neutron/tasks/upgrade.yml +++ b/ansible/roles/neutron/tasks/upgrade.yml @@ -1 +1,23 @@ --- +- include: config.yml + when: inventory_hostname in groups['compute'] + or inventory_hostname in groups['neutron-dhcp-agent'] + or inventory_hostname in groups['neutron-l3-agent'] + or inventory_hostname in groups['neutron-metadata-agent'] + or inventory_hostname in groups['neutron-server'] + +- include: config-neutron-fake.yml + when: + - inventory_hostname in groups['compute'] + - enable_nova_fake | bool + +- include: bootstrap_service.yml + when: inventory_hostname in groups['neutron-server'] + +- include: start.yml + serial: "%30" + when: inventory_hostname in groups['compute'] + or inventory_hostname in groups['neutron-dhcp-agent'] + or inventory_hostname in groups['neutron-l3-agent'] + or inventory_hostname in groups['neutron-metadata-agent'] + or inventory_hostname in groups['neutron-server']