diff --git a/releasenotes/notes/os_neutron-centos-support-6e3aede0f8b13af4.yaml b/releasenotes/notes/os_neutron-centos-support-6e3aede0f8b13af4.yaml new file mode 100644 index 00000000..85267951 --- /dev/null +++ b/releasenotes/notes/os_neutron-centos-support-6e3aede0f8b13af4.yaml @@ -0,0 +1,3 @@ +--- +features: + - CentOS7/RHEL support has been added to the os_neutron role. diff --git a/tasks/neutron_init_common.yml b/tasks/neutron_init_common.yml index 81b83e74..968730a9 100644 --- a/tasks/neutron_init_common.yml +++ b/tasks/neutron_init_common.yml @@ -23,5 +23,6 @@ service: name: "{{ program_name }}" enabled: "yes" + state: started notify: - Restart neutron services diff --git a/tasks/neutron_install-yum.yml b/tasks/neutron_install-yum.yml new file mode 100644 index 00000000..eb8644e9 --- /dev/null +++ b/tasks/neutron_install-yum.yml @@ -0,0 +1,86 @@ +--- +# Copyright 2014, Rackspace US, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +- name: Install RDO package + yum: + pkg: "{{ rdo_package }}" + state: "present" + register: install_cloud_rdo_package + until: install_cloud_rdo_package | success + retries: 5 + delay: 2 + +- name: Install neutron yum dependencies + yum: + pkg: "{{ item }}" + state: "{{ neutron_package_state }}" + register: install_packages + until: install_packages|success + retries: 5 + delay: 2 + with_items: "{{ neutron_distro_packages }}" + +- name: Install yum packages for LXB + yum: + pkg: "{{ item }}" + state: "{{ neutron_package_state }}" + register: install_packages + until: install_packages|success + retries: 5 + delay: 2 + with_items: "{{ neutron_lxb_distro_packages }}" + when: + - neutron_services['neutron-linuxbridge-agent']['group'] in group_names + - neutron_services['neutron-linuxbridge-agent'].service_en | bool + +- name: Install yum packages for OVS + yum: + pkg: "{{ item }}" + state: "{{ neutron_package_state }}" + register: install_packages + until: install_packages|success + retries: 5 + delay: 2 + with_items: "{{ neutron_ovs_distro_packages }}" + when: + - neutron_services['neutron-openvswitch-agent']['group'] in group_names + - neutron_services['neutron-openvswitch-agent'].service_en | bool + +- name: Install yum packages for LBaaS + yum: + pkg: "{{ item }}" + state: "{{ neutron_package_state }}" + register: install_packages + until: install_packages|success + retries: 5 + delay: 2 + with_items: "{{ neutron_lbaas_distro_packages }}" + when: + - neutron_services['neutron-lbaasv2-agent']['group'] in group_names + - neutron_lbaasv2 | bool + +- name: Install yum packages for VPNaaS + yum: + pkg: "{{ item }}" + state: "{{ neutron_package_state }}" + register: install_packages + until: install_packages|success + retries: 5 + delay: 2 + with_items: "{{ neutron_vpnaas_distro_packages }}" + when: + - neutron_services['neutron-vpnaas-agent']['group'] in group_names + - neutron_vpnaas | bool + diff --git a/tasks/neutron_install.yml b/tasks/neutron_install.yml index 043f6ee0..fe375eed 100644 --- a/tasks/neutron_install.yml +++ b/tasks/neutron_install.yml @@ -16,6 +16,9 @@ - include: neutron_install-apt.yml when: ansible_pkg_mgr == 'apt' +- include: neutron_install-yum.yml + when: ansible_pkg_mgr == 'yum' + - name: Create developer mode constraint file copy: dest: "/opt/developer-pip-constraints.txt" diff --git a/vars/redhat-7.yml b/vars/redhat-7.yml new file mode 100644 index 00000000..73294389 --- /dev/null +++ b/vars/redhat-7.yml @@ -0,0 +1,42 @@ +--- +# Copyright 2016, Rackspace US, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +rdo_package: "https://rdoproject.org/repos/rdo-release.rpm" + +neutron_ovs_distro_packages: + - openvswitch + +neutron_distro_packages: + - conntrack-tools + - dnsmasq + - dnsmasq-utils + - ebtables + - ipset + - iputils + - keepalived + - libpqxx-devel + - radvd + +neutron_lxb_distro_packages: + - bridge-utils + +neutron_lbaas_distro_packages: + - haproxy + +neutron_vpnaas_distro_packages: + - openswan + +neutron_lbaasv2_initscript_path: "/etc/init/neutron-lbaasv2-agent.conf" +neutron_lbaasv2_agent_servicename: "neutron-lbaasv2-agent"