Merge "Cleanup/standardize usage of tags"
This commit is contained in:
commit
70c4f1257a
10
README.rst
10
README.rst
@ -18,3 +18,13 @@ This role will install the following:
|
|||||||
- { role: "os_neutron", tags: [ "os-neutron" ] }
|
- { role: "os_neutron", tags: [ "os-neutron" ] }
|
||||||
vars:
|
vars:
|
||||||
neutron_galera_address: "{{ internal_lb_vip_address }}"
|
neutron_galera_address: "{{ internal_lb_vip_address }}"
|
||||||
|
|
||||||
|
Tags
|
||||||
|
====
|
||||||
|
|
||||||
|
This role supports two tags: ``neutron-install`` and ``neutron-config``
|
||||||
|
|
||||||
|
The ``neutron-install`` tag can be used to install and upgrade.
|
||||||
|
|
||||||
|
The ``neutron-config`` tag can be used to maintain configuration of the
|
||||||
|
service.
|
@ -37,22 +37,42 @@
|
|||||||
- always
|
- always
|
||||||
|
|
||||||
- include: neutron_check.yml
|
- include: neutron_check.yml
|
||||||
|
tags:
|
||||||
|
- always
|
||||||
|
|
||||||
- include: neutron_pre_install.yml
|
- include: neutron_pre_install.yml
|
||||||
|
tags:
|
||||||
|
- neutron-install
|
||||||
|
|
||||||
- include: neutron_install.yml
|
- include: neutron_install.yml
|
||||||
|
tags:
|
||||||
|
- neutron-install
|
||||||
|
|
||||||
- include: neutron_post_install.yml
|
- include: neutron_post_install.yml
|
||||||
|
tags:
|
||||||
|
- neutron-install
|
||||||
|
- neutron-config
|
||||||
|
|
||||||
# neutron system services
|
# neutron system services
|
||||||
- include: neutron_init.yml
|
- include: neutron_init.yml
|
||||||
|
tags:
|
||||||
|
- neutron-install
|
||||||
|
|
||||||
- include: neutron_lbaas.yml
|
- include: neutron_lbaas.yml
|
||||||
|
tags:
|
||||||
|
- neutron-install
|
||||||
|
|
||||||
- include: neutron_db_setup.yml
|
- include: neutron_db_setup.yml
|
||||||
when: >
|
when: >
|
||||||
inventory_hostname == groups[neutron_services['neutron-server']['group']][0]
|
inventory_hostname == groups[neutron_services['neutron-server']['group']][0]
|
||||||
|
tags:
|
||||||
|
- neutron-install
|
||||||
|
|
||||||
- include: neutron_service_setup.yml
|
- include: neutron_service_setup.yml
|
||||||
when: >
|
when: >
|
||||||
inventory_hostname == groups['neutron_all'][0]
|
inventory_hostname == groups['neutron_all'][0]
|
||||||
|
tags:
|
||||||
|
- neutron-install
|
||||||
|
|
||||||
- include: neutron_l3_ha.yml
|
- include: neutron_l3_ha.yml
|
||||||
when:
|
when:
|
||||||
|
@ -19,17 +19,11 @@
|
|||||||
library_path: "{{ neutron_lib_dir }}"
|
library_path: "{{ neutron_lib_dir }}"
|
||||||
bin_path: "{{ neutron_bin }}"
|
bin_path: "{{ neutron_bin }}"
|
||||||
when: neutron_plugin_type.split('.')[0] == 'ml2'
|
when: neutron_plugin_type.split('.')[0] == 'ml2'
|
||||||
tags:
|
|
||||||
- neutron-db-setup
|
|
||||||
- neutron-upgrade
|
|
||||||
|
|
||||||
- name: Print neutron migrations facts
|
- name: Print neutron migrations facts
|
||||||
debug:
|
debug:
|
||||||
var: neutron_migrations
|
var: neutron_migrations
|
||||||
when: neutron_plugin_type.split('.')[0] == 'ml2'
|
when: neutron_plugin_type.split('.')[0] == 'ml2'
|
||||||
tags:
|
|
||||||
- neutron-db-setup
|
|
||||||
- neutron-upgrade
|
|
||||||
|
|
||||||
- name: Perform a Neutron DB online upgrade (expand)
|
- name: Perform a Neutron DB online upgrade (expand)
|
||||||
command: |
|
command: |
|
||||||
@ -42,9 +36,6 @@
|
|||||||
when:
|
when:
|
||||||
- (neutron_migrations is defined and neutron_migrations['run_expand']|bool)
|
- (neutron_migrations is defined and neutron_migrations['run_expand']|bool)
|
||||||
- neutron_plugin_type.split('.')[0] == 'ml2'
|
- neutron_plugin_type.split('.')[0] == 'ml2'
|
||||||
tags:
|
|
||||||
- neutron-db-setup
|
|
||||||
- neutron-upgrade
|
|
||||||
|
|
||||||
- name: Stop Neutron server
|
- name: Stop Neutron server
|
||||||
service:
|
service:
|
||||||
@ -54,9 +45,6 @@
|
|||||||
delegate_to: "{{ item }}"
|
delegate_to: "{{ item }}"
|
||||||
with_items: "{{ groups[neutron_services['neutron-server']['group']] }}"
|
with_items: "{{ groups[neutron_services['neutron-server']['group']] }}"
|
||||||
when: (neutron_migrations is defined and neutron_migrations['run_contract']|bool) or neutron_plugin_type.split('.')[0] != 'ml2'
|
when: (neutron_migrations is defined and neutron_migrations['run_contract']|bool) or neutron_plugin_type.split('.')[0] != 'ml2'
|
||||||
tags:
|
|
||||||
- neutron-db-setup
|
|
||||||
- neutron-upgrade
|
|
||||||
|
|
||||||
- name: Perform a Neutron DB offline upgrade (contract)
|
- name: Perform a Neutron DB offline upgrade (contract)
|
||||||
command: |
|
command: |
|
||||||
@ -69,9 +57,6 @@
|
|||||||
when:
|
when:
|
||||||
- (neutron_migrations is defined and neutron_migrations['run_contract']|bool)
|
- (neutron_migrations is defined and neutron_migrations['run_contract']|bool)
|
||||||
- neutron_plugin_type.split('.')[0] == 'ml2'
|
- neutron_plugin_type.split('.')[0] == 'ml2'
|
||||||
tags:
|
|
||||||
- neutron-db-setup
|
|
||||||
- neutron-upgrade
|
|
||||||
|
|
||||||
# NOTE: We have to handle neutron_plugin_type.split('.')[0] != 'ml2' because not all neutron
|
# NOTE: We have to handle neutron_plugin_type.split('.')[0] != 'ml2' because not all neutron
|
||||||
# plugins have contract/expand branches which breaks neutron-db-manage.
|
# plugins have contract/expand branches which breaks neutron-db-manage.
|
||||||
@ -86,9 +71,6 @@
|
|||||||
become_user: "{{ neutron_system_user_name }}"
|
become_user: "{{ neutron_system_user_name }}"
|
||||||
when:
|
when:
|
||||||
- neutron_plugin_type.split('.')[0] != 'ml2'
|
- neutron_plugin_type.split('.')[0] != 'ml2'
|
||||||
tags:
|
|
||||||
- neutron-db-setup
|
|
||||||
- neutron-upgrade
|
|
||||||
|
|
||||||
- name: Start neutron server
|
- name: Start neutron server
|
||||||
service:
|
service:
|
||||||
@ -98,6 +80,3 @@
|
|||||||
delegate_to: "{{ item }}"
|
delegate_to: "{{ item }}"
|
||||||
with_items: "{{ groups[neutron_services['neutron-server']['group']] }}"
|
with_items: "{{ groups[neutron_services['neutron-server']['group']] }}"
|
||||||
when: (neutron_migrations is defined and neutron_migrations['run_contract']|bool) or neutron_plugin_type.split('.')[0] != 'ml2'
|
when: (neutron_migrations is defined and neutron_migrations['run_contract']|bool) or neutron_plugin_type.split('.')[0] != 'ml2'
|
||||||
tags:
|
|
||||||
- neutron-db-setup
|
|
||||||
- neutron-upgrade
|
|
||||||
|
@ -24,8 +24,6 @@
|
|||||||
when:
|
when:
|
||||||
- inventory_hostname in groups[neutron_services['neutron-server']['group']]
|
- inventory_hostname in groups[neutron_services['neutron-server']['group']]
|
||||||
- neutron_services['neutron-server'].service_en | bool
|
- neutron_services['neutron-server'].service_en | bool
|
||||||
tags:
|
|
||||||
- upstart-init
|
|
||||||
|
|
||||||
- include: neutron_init_common.yml
|
- include: neutron_init_common.yml
|
||||||
vars:
|
vars:
|
||||||
@ -38,8 +36,6 @@
|
|||||||
when:
|
when:
|
||||||
- inventory_hostname in groups[neutron_services['neutron-dhcp-agent']['group']]
|
- inventory_hostname in groups[neutron_services['neutron-dhcp-agent']['group']]
|
||||||
- neutron_services['neutron-dhcp-agent'].service_en | bool
|
- neutron_services['neutron-dhcp-agent'].service_en | bool
|
||||||
tags:
|
|
||||||
- upstart-init
|
|
||||||
|
|
||||||
- include: neutron_init_common.yml
|
- include: neutron_init_common.yml
|
||||||
vars:
|
vars:
|
||||||
@ -52,8 +48,6 @@
|
|||||||
when:
|
when:
|
||||||
- inventory_hostname in groups[neutron_services['neutron-l3-agent']['group']]
|
- inventory_hostname in groups[neutron_services['neutron-l3-agent']['group']]
|
||||||
- neutron_services['neutron-l3-agent'].service_en | bool
|
- neutron_services['neutron-l3-agent'].service_en | bool
|
||||||
tags:
|
|
||||||
- upstart-init
|
|
||||||
|
|
||||||
- include: neutron_init_common.yml
|
- include: neutron_init_common.yml
|
||||||
vars:
|
vars:
|
||||||
@ -66,8 +60,6 @@
|
|||||||
when:
|
when:
|
||||||
- inventory_hostname in groups[neutron_services['neutron-linuxbridge-agent']['group']]
|
- inventory_hostname in groups[neutron_services['neutron-linuxbridge-agent']['group']]
|
||||||
- neutron_services['neutron-linuxbridge-agent'].service_en | bool
|
- neutron_services['neutron-linuxbridge-agent'].service_en | bool
|
||||||
tags:
|
|
||||||
- upstart-init
|
|
||||||
|
|
||||||
- include: neutron_init_common.yml
|
- include: neutron_init_common.yml
|
||||||
vars:
|
vars:
|
||||||
@ -81,8 +73,6 @@
|
|||||||
- neutron_services['neutron-openvswitch-agent']['group'] in group_names
|
- neutron_services['neutron-openvswitch-agent']['group'] in group_names
|
||||||
- inventory_hostname in groups[neutron_services['neutron-openvswitch-agent']['group']]
|
- inventory_hostname in groups[neutron_services['neutron-openvswitch-agent']['group']]
|
||||||
- neutron_services['neutron-openvswitch-agent'].service_en | bool
|
- neutron_services['neutron-openvswitch-agent'].service_en | bool
|
||||||
tags:
|
|
||||||
- upstart-init
|
|
||||||
|
|
||||||
- include: neutron_init_common.yml
|
- include: neutron_init_common.yml
|
||||||
vars:
|
vars:
|
||||||
@ -95,8 +85,6 @@
|
|||||||
when:
|
when:
|
||||||
- inventory_hostname in groups[neutron_services['neutron-metadata-agent']['group']]
|
- inventory_hostname in groups[neutron_services['neutron-metadata-agent']['group']]
|
||||||
- neutron_services['neutron-metadata-agent'].service_en | bool
|
- neutron_services['neutron-metadata-agent'].service_en | bool
|
||||||
tags:
|
|
||||||
- upstart-init
|
|
||||||
|
|
||||||
- include: neutron_init_common.yml
|
- include: neutron_init_common.yml
|
||||||
vars:
|
vars:
|
||||||
@ -109,8 +97,6 @@
|
|||||||
when:
|
when:
|
||||||
- inventory_hostname in groups[neutron_services['neutron-metering-agent']['group']]
|
- inventory_hostname in groups[neutron_services['neutron-metering-agent']['group']]
|
||||||
- neutron_services['neutron-metering-agent'].service_en | bool
|
- neutron_services['neutron-metering-agent'].service_en | bool
|
||||||
tags:
|
|
||||||
- upstart-init
|
|
||||||
|
|
||||||
- include: neutron_init_common.yml
|
- include: neutron_init_common.yml
|
||||||
vars:
|
vars:
|
||||||
@ -123,8 +109,6 @@
|
|||||||
when:
|
when:
|
||||||
- inventory_hostname in groups[neutron_services['neutron-lbaas-agent']['group']]
|
- inventory_hostname in groups[neutron_services['neutron-lbaas-agent']['group']]
|
||||||
- neutron_services['neutron-lbaas-agent'].service_en | bool
|
- neutron_services['neutron-lbaas-agent'].service_en | bool
|
||||||
tags:
|
|
||||||
- upstart-init
|
|
||||||
|
|
||||||
- include: neutron_init_common.yml
|
- include: neutron_init_common.yml
|
||||||
vars:
|
vars:
|
||||||
@ -137,8 +121,6 @@
|
|||||||
when:
|
when:
|
||||||
- inventory_hostname in groups[neutron_services['neutron-lbaasv2-agent']['group']]
|
- inventory_hostname in groups[neutron_services['neutron-lbaasv2-agent']['group']]
|
||||||
- neutron_services['neutron-lbaasv2-agent'].service_en | bool
|
- neutron_services['neutron-lbaasv2-agent'].service_en | bool
|
||||||
tags:
|
|
||||||
- upstart-init
|
|
||||||
|
|
||||||
- include: neutron_init_common.yml
|
- include: neutron_init_common.yml
|
||||||
vars:
|
vars:
|
||||||
@ -151,5 +133,3 @@
|
|||||||
when:
|
when:
|
||||||
- inventory_hostname in groups[neutron_services['neutron-vpnaas-agent']['group']]
|
- inventory_hostname in groups[neutron_services['neutron-vpnaas-agent']['group']]
|
||||||
- neutron_services['neutron-vpnaas-agent'].service_en | bool
|
- neutron_services['neutron-vpnaas-agent'].service_en | bool
|
||||||
tags:
|
|
||||||
- upstart-init
|
|
||||||
|
@ -15,13 +15,9 @@
|
|||||||
|
|
||||||
- include: neutron_init_upstart.yml
|
- include: neutron_init_upstart.yml
|
||||||
when: pid1_name == "init"
|
when: pid1_name == "init"
|
||||||
tags:
|
|
||||||
- neutron-init
|
|
||||||
|
|
||||||
- include: neutron_init_systemd.yml
|
- include: neutron_init_systemd.yml
|
||||||
when: pid1_name == "systemd"
|
when: pid1_name == "systemd"
|
||||||
tags:
|
|
||||||
- neutron-init
|
|
||||||
|
|
||||||
- name: Load service
|
- name: Load service
|
||||||
service:
|
service:
|
||||||
@ -29,6 +25,3 @@
|
|||||||
enabled: "yes"
|
enabled: "yes"
|
||||||
notify:
|
notify:
|
||||||
- Restart neutron services
|
- Restart neutron services
|
||||||
tags:
|
|
||||||
- upstart-init
|
|
||||||
- neutron-init
|
|
||||||
|
@ -21,14 +21,8 @@
|
|||||||
owner: "root"
|
owner: "root"
|
||||||
group: "root"
|
group: "root"
|
||||||
register: upstart_init
|
register: upstart_init
|
||||||
tags:
|
|
||||||
- upstart-init
|
|
||||||
- neutron-init
|
|
||||||
|
|
||||||
- name: Reload init scripts
|
- name: Reload init scripts
|
||||||
shell: |
|
shell: |
|
||||||
initctl reload-configuration
|
initctl reload-configuration
|
||||||
when: upstart_init | changed
|
when: upstart_init | changed
|
||||||
tags:
|
|
||||||
- upstart-init
|
|
||||||
- neutron-init
|
|
||||||
|
@ -34,16 +34,12 @@
|
|||||||
stat:
|
stat:
|
||||||
path: /var/cache/apt
|
path: /var/cache/apt
|
||||||
register: apt_cache_stat
|
register: apt_cache_stat
|
||||||
tags:
|
|
||||||
- neutron-apt-packages
|
|
||||||
|
|
||||||
- name: Update apt if needed
|
- name: Update apt if needed
|
||||||
apt:
|
apt:
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
when: ("ansible_date_time.epoch|float - apt_cache_stat.stat.mtime > {{cache_timeout}}" or
|
when: ("ansible_date_time.epoch|float - apt_cache_stat.stat.mtime > {{cache_timeout}}" or
|
||||||
add_uca_keys | changed or add_uca_repo | changed)
|
add_uca_keys | changed or add_uca_repo | changed)
|
||||||
tags:
|
|
||||||
- neutron-apt-packages
|
|
||||||
|
|
||||||
- name: Install neutron apt dependencies
|
- name: Install neutron apt dependencies
|
||||||
apt:
|
apt:
|
||||||
@ -54,9 +50,6 @@
|
|||||||
retries: 5
|
retries: 5
|
||||||
delay: 2
|
delay: 2
|
||||||
with_items: "{{ neutron_apt_packages }}"
|
with_items: "{{ neutron_apt_packages }}"
|
||||||
tags:
|
|
||||||
- neutron-install
|
|
||||||
- neutron-apt-packages
|
|
||||||
|
|
||||||
- name: Install apt packages for lxb
|
- name: Install apt packages for lxb
|
||||||
apt:
|
apt:
|
||||||
@ -71,9 +64,6 @@
|
|||||||
- inventory_hostname in groups[neutron_services['neutron-linuxbridge-agent']['group']]
|
- inventory_hostname in groups[neutron_services['neutron-linuxbridge-agent']['group']]
|
||||||
- neutron_services['neutron-linuxbridge-agent']['group'] in group_names
|
- neutron_services['neutron-linuxbridge-agent']['group'] in group_names
|
||||||
- neutron_services['neutron-linuxbridge-agent'].service_en | bool
|
- neutron_services['neutron-linuxbridge-agent'].service_en | bool
|
||||||
tags:
|
|
||||||
- neutron-install
|
|
||||||
- neutron-apt-packages
|
|
||||||
|
|
||||||
- name: Install apt packages for ovs
|
- name: Install apt packages for ovs
|
||||||
apt:
|
apt:
|
||||||
@ -88,9 +78,6 @@
|
|||||||
- inventory_hostname in groups[neutron_services['neutron-openvswitch-agent']['group']]
|
- inventory_hostname in groups[neutron_services['neutron-openvswitch-agent']['group']]
|
||||||
- neutron_services['neutron-openvswitch-agent']['group'] in group_names
|
- neutron_services['neutron-openvswitch-agent']['group'] in group_names
|
||||||
- neutron_services['neutron-openvswitch-agent'].service_en | bool
|
- neutron_services['neutron-openvswitch-agent'].service_en | bool
|
||||||
tags:
|
|
||||||
- neutron-install
|
|
||||||
- neutron-apt-packages
|
|
||||||
|
|
||||||
- name: Install apt packages for LBaaS
|
- name: Install apt packages for LBaaS
|
||||||
apt:
|
apt:
|
||||||
@ -104,9 +91,6 @@
|
|||||||
when:
|
when:
|
||||||
- inventory_hostname in groups[neutron_services['neutron-lbaas-agent']['group']]
|
- inventory_hostname in groups[neutron_services['neutron-lbaas-agent']['group']]
|
||||||
- neutron_lbaas | bool or neutron_lbaasv2 | bool
|
- neutron_lbaas | bool or neutron_lbaasv2 | bool
|
||||||
tags:
|
|
||||||
- neutron-install
|
|
||||||
- neutron-apt-packages
|
|
||||||
|
|
||||||
- name: Install apt packages for VPNaaS
|
- name: Install apt packages for VPNaaS
|
||||||
apt:
|
apt:
|
||||||
@ -120,9 +104,6 @@
|
|||||||
when:
|
when:
|
||||||
- inventory_hostname in groups[neutron_services['neutron-vpnaas-agent']['group']]
|
- inventory_hostname in groups[neutron_services['neutron-vpnaas-agent']['group']]
|
||||||
- neutron_vpnaas | bool
|
- neutron_vpnaas | bool
|
||||||
tags:
|
|
||||||
- neutron-install
|
|
||||||
- neutron-apt-packages
|
|
||||||
|
|
||||||
- name: remove specific apt packages
|
- name: remove specific apt packages
|
||||||
apt:
|
apt:
|
||||||
@ -133,6 +114,3 @@
|
|||||||
retries: 5
|
retries: 5
|
||||||
delay: 2
|
delay: 2
|
||||||
with_items: "{{ neutron_apt_remove_packages }}"
|
with_items: "{{ neutron_apt_remove_packages }}"
|
||||||
tags:
|
|
||||||
- neutron-install
|
|
||||||
- neutron-apt-packages
|
|
@ -16,8 +16,6 @@
|
|||||||
- include: neutron_install-apt.yml
|
- include: neutron_install-apt.yml
|
||||||
when:
|
when:
|
||||||
- ansible_pkg_mgr == 'apt'
|
- ansible_pkg_mgr == 'apt'
|
||||||
tags:
|
|
||||||
- install-apt
|
|
||||||
|
|
||||||
- name: Create developer mode constraint file
|
- name: Create developer mode constraint file
|
||||||
copy:
|
copy:
|
||||||
@ -28,9 +26,6 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
when:
|
when:
|
||||||
- neutron_developer_mode | bool
|
- neutron_developer_mode | bool
|
||||||
tags:
|
|
||||||
- neutron-install
|
|
||||||
- neutron-pip-packages
|
|
||||||
|
|
||||||
- name: Clone requirements git repository
|
- name: Clone requirements git repository
|
||||||
git:
|
git:
|
||||||
@ -41,27 +36,18 @@
|
|||||||
version: "{{ neutron_requirements_git_install_branch }}"
|
version: "{{ neutron_requirements_git_install_branch }}"
|
||||||
when:
|
when:
|
||||||
- neutron_developer_mode | bool
|
- neutron_developer_mode | bool
|
||||||
tags:
|
|
||||||
- neutron-install
|
|
||||||
- neutron-pip-packages
|
|
||||||
|
|
||||||
- name: Add constraints to pip_install_options fact for developer mode
|
- name: Add constraints to pip_install_options fact for developer mode
|
||||||
set_fact:
|
set_fact:
|
||||||
pip_install_options_fact: "{{ pip_install_options|default('') }} --constraint /opt/developer-pip-constraints.txt --constraint /opt/requirements/upper-constraints.txt"
|
pip_install_options_fact: "{{ pip_install_options|default('') }} --constraint /opt/developer-pip-constraints.txt --constraint /opt/requirements/upper-constraints.txt"
|
||||||
when:
|
when:
|
||||||
- neutron_developer_mode | bool
|
- neutron_developer_mode | bool
|
||||||
tags:
|
|
||||||
- neutron-install
|
|
||||||
- neutron-pip-packages
|
|
||||||
|
|
||||||
- name: Set pip_install_options_fact when not in developer mode
|
- name: Set pip_install_options_fact when not in developer mode
|
||||||
set_fact:
|
set_fact:
|
||||||
pip_install_options_fact: "{{ pip_install_options|default('') }}"
|
pip_install_options_fact: "{{ pip_install_options|default('') }}"
|
||||||
when:
|
when:
|
||||||
- not neutron_developer_mode | bool
|
- not neutron_developer_mode | bool
|
||||||
tags:
|
|
||||||
- neutron-install
|
|
||||||
- neutron-pip-packages
|
|
||||||
|
|
||||||
- name: Install requires pip packages
|
- name: Install requires pip packages
|
||||||
pip:
|
pip:
|
||||||
@ -73,9 +59,6 @@
|
|||||||
retries: 5
|
retries: 5
|
||||||
delay: 2
|
delay: 2
|
||||||
with_items: "{{ neutron_requires_pip_packages }}"
|
with_items: "{{ neutron_requires_pip_packages }}"
|
||||||
tags:
|
|
||||||
- neutron-install
|
|
||||||
- neutron-pip-packages
|
|
||||||
|
|
||||||
- name: Get local venv checksum
|
- name: Get local venv checksum
|
||||||
stat:
|
stat:
|
||||||
@ -84,9 +67,6 @@
|
|||||||
when:
|
when:
|
||||||
- not neutron_developer_mode | bool
|
- not neutron_developer_mode | bool
|
||||||
register: local_venv_stat
|
register: local_venv_stat
|
||||||
tags:
|
|
||||||
- neutron-install
|
|
||||||
- neutron-pip-packages
|
|
||||||
|
|
||||||
- name: Get remote venv checksum
|
- name: Get remote venv checksum
|
||||||
uri:
|
uri:
|
||||||
@ -95,9 +75,6 @@
|
|||||||
when:
|
when:
|
||||||
- not neutron_developer_mode | bool
|
- not neutron_developer_mode | bool
|
||||||
register: remote_venv_checksum
|
register: remote_venv_checksum
|
||||||
tags:
|
|
||||||
- neutron-install
|
|
||||||
- neutron-pip-packages
|
|
||||||
|
|
||||||
# TODO: When project moves to ansible 2 we can pass this a sha256sum which will:
|
# TODO: When project moves to ansible 2 we can pass this a sha256sum which will:
|
||||||
# a) allow us to remove force: yes
|
# a) allow us to remove force: yes
|
||||||
@ -115,16 +92,10 @@
|
|||||||
- not neutron_developer_mode | bool
|
- not neutron_developer_mode | bool
|
||||||
- (local_venv_stat.stat.exists == False or
|
- (local_venv_stat.stat.exists == False or
|
||||||
{{ local_venv_stat.stat.checksum is defined and local_venv_stat.stat.checksum != remote_venv_checksum.content | trim }})
|
{{ local_venv_stat.stat.checksum is defined and local_venv_stat.stat.checksum != remote_venv_checksum.content | trim }})
|
||||||
tags:
|
|
||||||
- neutron-install
|
|
||||||
- neutron-pip-packages
|
|
||||||
|
|
||||||
- name: Set neutron get_venv fact
|
- name: Set neutron get_venv fact
|
||||||
set_fact:
|
set_fact:
|
||||||
neutron_get_venv: "{{ get_venv }}"
|
neutron_get_venv: "{{ get_venv }}"
|
||||||
tags:
|
|
||||||
- neutron-install
|
|
||||||
- neutron-pip-packages
|
|
||||||
|
|
||||||
- name: Remove existing venv
|
- name: Remove existing venv
|
||||||
file:
|
file:
|
||||||
@ -132,9 +103,6 @@
|
|||||||
state: absent
|
state: absent
|
||||||
when:
|
when:
|
||||||
- neutron_get_venv | changed
|
- neutron_get_venv | changed
|
||||||
tags:
|
|
||||||
- neutron-install
|
|
||||||
- neutron-pip-packages
|
|
||||||
|
|
||||||
- name: Create neutron venv dir
|
- name: Create neutron venv dir
|
||||||
file:
|
file:
|
||||||
@ -143,9 +111,6 @@
|
|||||||
register: neutron_venv_dir
|
register: neutron_venv_dir
|
||||||
when:
|
when:
|
||||||
- not neutron_developer_mode | bool
|
- not neutron_developer_mode | bool
|
||||||
tags:
|
|
||||||
- neutron-install
|
|
||||||
- neutron-pip-packages
|
|
||||||
|
|
||||||
- name: Unarchive pre-built venv
|
- name: Unarchive pre-built venv
|
||||||
unarchive:
|
unarchive:
|
||||||
@ -156,9 +121,6 @@
|
|||||||
- not neutron_developer_mode | bool
|
- not neutron_developer_mode | bool
|
||||||
- neutron_get_venv | changed or neutron_venv_dir | changed
|
- neutron_get_venv | changed or neutron_venv_dir | changed
|
||||||
notify: Restart neutron services
|
notify: Restart neutron services
|
||||||
tags:
|
|
||||||
- neutron-install
|
|
||||||
- neutron-pip-packages
|
|
||||||
|
|
||||||
- name: Install pip packages
|
- name: Install pip packages
|
||||||
pip:
|
pip:
|
||||||
@ -175,9 +137,6 @@
|
|||||||
when:
|
when:
|
||||||
- neutron_get_venv | failed or neutron_developer_mode | bool
|
- neutron_get_venv | failed or neutron_developer_mode | bool
|
||||||
notify: Restart neutron services
|
notify: Restart neutron services
|
||||||
tags:
|
|
||||||
- neutron-install
|
|
||||||
- neutron-pip-packages
|
|
||||||
|
|
||||||
- name: Update virtualenv path
|
- name: Update virtualenv path
|
||||||
command: >
|
command: >
|
||||||
@ -185,6 +144,3 @@
|
|||||||
when:
|
when:
|
||||||
- not neutron_developer_mode | bool
|
- not neutron_developer_mode | bool
|
||||||
- neutron_get_venv | success
|
- neutron_get_venv | success
|
||||||
tags:
|
|
||||||
- neutron-install
|
|
||||||
- neutron-pip-packages
|
|
@ -23,23 +23,17 @@
|
|||||||
owner: "root"
|
owner: "root"
|
||||||
group: "root"
|
group: "root"
|
||||||
mode: "0755"
|
mode: "0755"
|
||||||
tags:
|
|
||||||
- neutron-ha-tool
|
|
||||||
|
|
||||||
- name: Convert the hostname to an int
|
- name: Convert the hostname to an int
|
||||||
name2int:
|
name2int:
|
||||||
name: "{{ inventory_hostname }}"
|
name: "{{ inventory_hostname }}"
|
||||||
register: hashed_name
|
register: hashed_name
|
||||||
tags:
|
|
||||||
- neutron-ha-tool
|
|
||||||
|
|
||||||
# These are used in the Neutron HA Cron job script, and processed in the template.
|
# These are used in the Neutron HA Cron job script, and processed in the template.
|
||||||
- name: Creating Job Facts
|
- name: Creating Job Facts
|
||||||
set_fact:
|
set_fact:
|
||||||
do_job: ". /root/openrc && /opt/neutron-ha-tool.py {% if keystone_service_internaluri_insecure | bool %}--insecure {% endif %}--l3-agent-migrate"
|
do_job: ". /root/openrc && /opt/neutron-ha-tool.py {% if keystone_service_internaluri_insecure | bool %}--insecure {% endif %}--l3-agent-migrate"
|
||||||
sleep_time: "{{ hashed_name.int_value }}"
|
sleep_time: "{{ hashed_name.int_value }}"
|
||||||
tags:
|
|
||||||
- neutron-ha-tool
|
|
||||||
|
|
||||||
- name: "Drop Neutron HA job script"
|
- name: "Drop Neutron HA job script"
|
||||||
template:
|
template:
|
||||||
@ -48,8 +42,6 @@
|
|||||||
owner: "root"
|
owner: "root"
|
||||||
group: "root"
|
group: "root"
|
||||||
mode: "0755"
|
mode: "0755"
|
||||||
tags:
|
|
||||||
- neutron-ha-tool
|
|
||||||
|
|
||||||
- name: Create Neutron HA
|
- name: Create Neutron HA
|
||||||
cron:
|
cron:
|
||||||
@ -62,5 +54,3 @@
|
|||||||
job: "/opt/neutron-ha-tool.sh"
|
job: "/opt/neutron-ha-tool.sh"
|
||||||
user: root
|
user: root
|
||||||
cron_file: "neutron-ha-tool"
|
cron_file: "neutron-ha-tool"
|
||||||
tags:
|
|
||||||
- neutron-ha-tool
|
|
||||||
|
@ -47,8 +47,6 @@
|
|||||||
config_type: "json"
|
config_type: "json"
|
||||||
notify:
|
notify:
|
||||||
- Restart neutron services
|
- Restart neutron services
|
||||||
tags:
|
|
||||||
- neutron-config
|
|
||||||
|
|
||||||
- name: Generate neutron dnsmasq Config
|
- name: Generate neutron dnsmasq Config
|
||||||
config_template:
|
config_template:
|
||||||
@ -63,8 +61,6 @@
|
|||||||
- Restart neutron services
|
- Restart neutron services
|
||||||
when: >
|
when: >
|
||||||
inventory_hostname in groups[neutron_services['neutron-dhcp-agent']['group']]
|
inventory_hostname in groups[neutron_services['neutron-dhcp-agent']['group']]
|
||||||
tags:
|
|
||||||
- neutron-config
|
|
||||||
|
|
||||||
- name: Generate neutron agent only Config
|
- name: Generate neutron agent only Config
|
||||||
config_template:
|
config_template:
|
||||||
@ -82,8 +78,6 @@
|
|||||||
- item.value.service_en | bool
|
- item.value.service_en | bool
|
||||||
- item.value.service_conf is defined
|
- item.value.service_conf is defined
|
||||||
- inventory_hostname in groups[item.value.group]
|
- inventory_hostname in groups[item.value.group]
|
||||||
tags:
|
|
||||||
- neutron-config
|
|
||||||
|
|
||||||
- name: Drop neutron rootwrap filters
|
- name: Drop neutron rootwrap filters
|
||||||
copy:
|
copy:
|
||||||
@ -103,8 +97,6 @@
|
|||||||
- { src: "rootwrap.d/vpnaas.filters", dest: "/etc/neutron/rootwrap.d/vpnaas.filters" }
|
- { src: "rootwrap.d/vpnaas.filters", dest: "/etc/neutron/rootwrap.d/vpnaas.filters" }
|
||||||
notify:
|
notify:
|
||||||
- Restart neutron services
|
- Restart neutron services
|
||||||
tags:
|
|
||||||
- neutron-config
|
|
||||||
|
|
||||||
- name: Drop neutron agent rootwrap filters
|
- name: Drop neutron agent rootwrap filters
|
||||||
copy:
|
copy:
|
||||||
@ -118,8 +110,6 @@
|
|||||||
- item.value.service_rootwrap is defined
|
- item.value.service_rootwrap is defined
|
||||||
notify:
|
notify:
|
||||||
- Restart neutron services
|
- Restart neutron services
|
||||||
tags:
|
|
||||||
- neutron_config
|
|
||||||
|
|
||||||
- name: Setup PLUMgrid config
|
- name: Setup PLUMgrid config
|
||||||
include: plumgrid_config.yml
|
include: plumgrid_config.yml
|
||||||
@ -137,9 +127,6 @@
|
|||||||
mode: "0440"
|
mode: "0440"
|
||||||
owner: "root"
|
owner: "root"
|
||||||
group: "root"
|
group: "root"
|
||||||
tags:
|
|
||||||
- sudoers
|
|
||||||
- neutron-sudoers
|
|
||||||
|
|
||||||
- name: Drop metadata iptables checksum fix
|
- name: Drop metadata iptables checksum fix
|
||||||
copy:
|
copy:
|
||||||
@ -151,15 +138,9 @@
|
|||||||
when:
|
when:
|
||||||
- neutron_metadata_checksum_fix | bool
|
- neutron_metadata_checksum_fix | bool
|
||||||
- inventory_hostname in groups[neutron_services['neutron-linuxbridge-agent']['group']]
|
- inventory_hostname in groups[neutron_services['neutron-linuxbridge-agent']['group']]
|
||||||
tags:
|
|
||||||
- neutron-config
|
|
||||||
- neutron-checksum-fix
|
|
||||||
|
|
||||||
- name: Run metadata iptables checksum fix
|
- name: Run metadata iptables checksum fix
|
||||||
command: /etc/network/if-up.d/post-up-metadata-checksum
|
command: /etc/network/if-up.d/post-up-metadata-checksum
|
||||||
when:
|
when:
|
||||||
- neutron_metadata_checksum_fix | bool
|
- neutron_metadata_checksum_fix | bool
|
||||||
- inventory_hostname in groups[neutron_services['neutron-linuxbridge-agent']['group']]
|
- inventory_hostname in groups[neutron_services['neutron-linuxbridge-agent']['group']]
|
||||||
tags:
|
|
||||||
- neutron-config
|
|
||||||
- neutron-checksum-fix
|
|
||||||
|
@ -18,8 +18,6 @@
|
|||||||
name: "{{ neutron_system_group_name }}"
|
name: "{{ neutron_system_group_name }}"
|
||||||
state: "present"
|
state: "present"
|
||||||
system: "yes"
|
system: "yes"
|
||||||
tags:
|
|
||||||
- neutron-group
|
|
||||||
|
|
||||||
- name: Create the neutron system user
|
- name: Create the neutron system user
|
||||||
user:
|
user:
|
||||||
@ -30,8 +28,6 @@
|
|||||||
system: "yes"
|
system: "yes"
|
||||||
createhome: "yes"
|
createhome: "yes"
|
||||||
home: "/var/lib/{{ neutron_system_user_name }}"
|
home: "/var/lib/{{ neutron_system_user_name }}"
|
||||||
tags:
|
|
||||||
- neutron-user
|
|
||||||
|
|
||||||
- name: Create neutron dir
|
- name: Create neutron dir
|
||||||
file:
|
file:
|
||||||
@ -51,8 +47,6 @@
|
|||||||
- { path: "/var/run/neutron" }
|
- { path: "/var/run/neutron" }
|
||||||
- { path: "{{ neutron_system_home_folder }}" }
|
- { path: "{{ neutron_system_home_folder }}" }
|
||||||
- { path: "{{ neutron_system_home_folder }}/ha_confs" }
|
- { path: "{{ neutron_system_home_folder }}/ha_confs" }
|
||||||
tags:
|
|
||||||
- neutron-dirs
|
|
||||||
|
|
||||||
- name: Test for log directory or link
|
- name: Test for log directory or link
|
||||||
shell: |
|
shell: |
|
||||||
@ -65,9 +59,6 @@
|
|||||||
register: log_dir
|
register: log_dir
|
||||||
failed_when: false
|
failed_when: false
|
||||||
changed_when: log_dir.rc != 0
|
changed_when: log_dir.rc != 0
|
||||||
tags:
|
|
||||||
- neutron-dirs
|
|
||||||
- neutron-logs
|
|
||||||
|
|
||||||
- name: Create neutron log dir
|
- name: Create neutron log dir
|
||||||
file:
|
file:
|
||||||
@ -79,9 +70,6 @@
|
|||||||
with_items:
|
with_items:
|
||||||
- { path: "/var/log/neutron" }
|
- { path: "/var/log/neutron" }
|
||||||
when: log_dir.rc != 0
|
when: log_dir.rc != 0
|
||||||
tags:
|
|
||||||
- neutron-dirs
|
|
||||||
- neutron-logs
|
|
||||||
|
|
||||||
- name: Drop sudoers file
|
- name: Drop sudoers file
|
||||||
template:
|
template:
|
||||||
@ -90,6 +78,3 @@
|
|||||||
mode: "0440"
|
mode: "0440"
|
||||||
owner: "root"
|
owner: "root"
|
||||||
group: "root"
|
group: "root"
|
||||||
tags:
|
|
||||||
- sudoers
|
|
||||||
- neutron-sudoers
|
|
||||||
|
@ -29,10 +29,6 @@
|
|||||||
until: add_service|success
|
until: add_service|success
|
||||||
retries: 5
|
retries: 5
|
||||||
delay: 2
|
delay: 2
|
||||||
tags:
|
|
||||||
- neutron-api-setup
|
|
||||||
- neutron-service-add
|
|
||||||
- neutron-setup
|
|
||||||
|
|
||||||
# Create an admin user
|
# Create an admin user
|
||||||
- name: Ensure neutron user
|
- name: Ensure neutron user
|
||||||
@ -51,10 +47,6 @@
|
|||||||
until: add_service|success
|
until: add_service|success
|
||||||
retries: 5
|
retries: 5
|
||||||
delay: 10
|
delay: 10
|
||||||
tags:
|
|
||||||
- neutron-api-setup
|
|
||||||
- neutron-service-add
|
|
||||||
- neutron-setup
|
|
||||||
|
|
||||||
# Add a role to the user
|
# Add a role to the user
|
||||||
- name: Ensure neutron user to admin role
|
- name: Ensure neutron user to admin role
|
||||||
@ -73,10 +65,6 @@
|
|||||||
until: add_service|success
|
until: add_service|success
|
||||||
retries: 5
|
retries: 5
|
||||||
delay: 10
|
delay: 10
|
||||||
tags:
|
|
||||||
- neutron-api-setup
|
|
||||||
- neutron-service-add
|
|
||||||
- neutron-setup
|
|
||||||
|
|
||||||
# Create an endpoint
|
# Create an endpoint
|
||||||
- name: Ensure neutron endpoint
|
- name: Ensure neutron endpoint
|
||||||
@ -101,7 +89,3 @@
|
|||||||
until: add_service|success
|
until: add_service|success
|
||||||
retries: 5
|
retries: 5
|
||||||
delay: 10
|
delay: 10
|
||||||
tags:
|
|
||||||
- neutron-api-setup
|
|
||||||
- neutron-service-add
|
|
||||||
- neutron-setup
|
|
||||||
|
@ -24,6 +24,3 @@
|
|||||||
- "{{ neutron_proprietary_nuage_pip_packages }}"
|
- "{{ neutron_proprietary_nuage_pip_packages }}"
|
||||||
when:
|
when:
|
||||||
- inventory_hostname in groups[neutron_services['neutron-server']['group']]
|
- inventory_hostname in groups[neutron_services['neutron-server']['group']]
|
||||||
tags:
|
|
||||||
- neutron-install
|
|
||||||
- neutron-pip-packages
|
|
||||||
|
@ -20,8 +20,6 @@
|
|||||||
group: "{{ neutron_system_group_name }}"
|
group: "{{ neutron_system_group_name }}"
|
||||||
config_overrides: "{{ neutron_plumlib_ini_overrides }}"
|
config_overrides: "{{ neutron_plumlib_ini_overrides }}"
|
||||||
config_type: "ini"
|
config_type: "ini"
|
||||||
tags:
|
|
||||||
- neutron_config
|
|
||||||
|
|
||||||
- name: Place pgrc file
|
- name: Place pgrc file
|
||||||
template:
|
template:
|
||||||
@ -29,8 +27,6 @@
|
|||||||
dest: /etc/neutron/plugins/plumgrid/pgrc
|
dest: /etc/neutron/plugins/plumgrid/pgrc
|
||||||
owner: "{{ neutron_system_user_name }}"
|
owner: "{{ neutron_system_user_name }}"
|
||||||
group: "{{ neutron_system_group_name }}"
|
group: "{{ neutron_system_group_name }}"
|
||||||
tags:
|
|
||||||
- neutron_config
|
|
||||||
|
|
||||||
- name: Install plumgrid pip packages
|
- name: Install plumgrid pip packages
|
||||||
pip:
|
pip:
|
||||||
@ -48,9 +44,6 @@
|
|||||||
- "{{ neutron_optional_plumgrid_pip_packages }}"
|
- "{{ neutron_optional_plumgrid_pip_packages }}"
|
||||||
when:
|
when:
|
||||||
- inventory_hostname in groups[neutron_services['neutron-server']['group']]
|
- inventory_hostname in groups[neutron_services['neutron-server']['group']]
|
||||||
tags:
|
|
||||||
- neutron-install
|
|
||||||
- neutron-pip-packages
|
|
||||||
|
|
||||||
- name: Install plumgrid pip packages fall back
|
- name: Install plumgrid pip packages fall back
|
||||||
pip:
|
pip:
|
||||||
@ -68,6 +61,3 @@
|
|||||||
when:
|
when:
|
||||||
- install_packages | failed
|
- install_packages | failed
|
||||||
- inventory_hostname in groups[neutron_services['neutron-server']['group']]
|
- inventory_hostname in groups[neutron_services['neutron-server']['group']]
|
||||||
tags:
|
|
||||||
- neutron-install
|
|
||||||
- neutron-pip-packages
|
|
||||||
|
Loading…
Reference in New Issue
Block a user