Move UCA repo URL var to role defaults
In order to expose the var in role documentation and to allow the use of dynamically set facts to override the value in CI environments the variables are moved from the role vars to the role defaults. The test preparation implements an override of the URL for OpenStack-CI to make use of the local mirrors. The variable to enable/disable the use of UCA has been standardised to the same as the os_nova role. Change-Id: I442f6dca8345f78848536f2fc923b72be8a6d092
This commit is contained in:
parent
30899b8368
commit
1240dd0cf0
@ -38,8 +38,6 @@ neutron_developer_constraints:
|
|||||||
- "git+{{ neutron_lbaas_git_repo }}@{{ neutron_lbaas_git_install_branch }}#egg=neutron-lbaas"
|
- "git+{{ neutron_lbaas_git_repo }}@{{ neutron_lbaas_git_install_branch }}#egg=neutron-lbaas"
|
||||||
- "git+{{ neutron_vpnaas_git_repo }}@{{ neutron_vpnaas_git_install_branch }}#egg=neutron-vpnaas"
|
- "git+{{ neutron_vpnaas_git_repo }}@{{ neutron_vpnaas_git_install_branch }}#egg=neutron-vpnaas"
|
||||||
|
|
||||||
neutron_use_uca: True
|
|
||||||
|
|
||||||
# Name of the virtual env to deploy into
|
# Name of the virtual env to deploy into
|
||||||
neutron_venv_tag: untagged
|
neutron_venv_tag: untagged
|
||||||
neutron_bin: "/openstack/venvs/neutron-{{ neutron_venv_tag }}/bin"
|
neutron_bin: "/openstack/venvs/neutron-{{ neutron_venv_tag }}/bin"
|
||||||
@ -384,6 +382,11 @@ neutron_service_in_ldap: false
|
|||||||
# neutron_local_ip is used for the VXLAN local tunnel endpoint
|
# neutron_local_ip is used for the VXLAN local tunnel endpoint
|
||||||
neutron_local_ip: 127.0.0.1
|
neutron_local_ip: 127.0.0.1
|
||||||
|
|
||||||
|
# Toggle the use of Ubuntu Cloud Archive
|
||||||
|
neutron_uca_enable: True
|
||||||
|
# Ubuntu Cloud Archive mirror URL
|
||||||
|
uca_apt_repo_url: "http://ubuntu-cloud.archive.canonical.com/ubuntu"
|
||||||
|
|
||||||
# When running in an AIO, we need to implement an iptables rule in any
|
# When running in an AIO, we need to implement an iptables rule in any
|
||||||
# neutron_agent containers to that ensure instances can communicate with
|
# neutron_agent containers to that ensure instances can communicate with
|
||||||
# the neutron metadata service. This is necessary because in an AIO
|
# the neutron metadata service. This is necessary because in an AIO
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
---
|
---
|
||||||
other:
|
upgrade:
|
||||||
- Neutron now makes use of ubuntu cloud archive by
|
- Neutron now makes use of Ubuntu Cloud Archive by default. This can be
|
||||||
default. This can be disabled by setting
|
disabled by setting ``neutron_uca_enable`` to ``False``.
|
||||||
``neutron_use_uca`` to ``False`` in your user
|
|
||||||
variables.
|
|
||||||
|
@ -18,14 +18,14 @@
|
|||||||
pkg: ubuntu-cloud-keyring
|
pkg: ubuntu-cloud-keyring
|
||||||
state: latest
|
state: latest
|
||||||
register: add_uca_keys
|
register: add_uca_keys
|
||||||
when: neutron_use_uca | bool
|
when: neutron_uca_enable | bool
|
||||||
|
|
||||||
- name: Add Ubuntu Cloud Archive Repository
|
- name: Add Ubuntu Cloud Archive Repository
|
||||||
apt_repository:
|
apt_repository:
|
||||||
repo: "{{ uca_repo }}"
|
repo: "{{ uca_repo }}"
|
||||||
state: present
|
state: present
|
||||||
register: add_uca_repo
|
register: add_uca_repo
|
||||||
when: neutron_use_uca | bool
|
when: neutron_uca_enable | bool
|
||||||
|
|
||||||
#TODO(evrardjp): Replace the next 2 tasks by a standard apt with cache
|
#TODO(evrardjp): Replace the next 2 tasks by a standard apt with cache
|
||||||
#when https://github.com/ansible/ansible-modules-core/pull/1517 is merged
|
#when https://github.com/ansible/ansible-modules-core/pull/1517 is merged
|
||||||
|
@ -91,6 +91,21 @@
|
|||||||
when: inventory_hostname == groups['neutron_all'][0]
|
when: inventory_hostname == groups['neutron_all'][0]
|
||||||
tags:
|
tags:
|
||||||
- mysql-db-setup
|
- mysql-db-setup
|
||||||
|
- name: Check if this is an OpenStack-CI nodepool instance
|
||||||
|
stat:
|
||||||
|
path: /etc/nodepool/provider
|
||||||
|
register: nodepool
|
||||||
|
delegate_to: localhost
|
||||||
|
- name: Determine the existing Ubuntu repo URL (only on OpenStack-CI)
|
||||||
|
shell: 'awk "/^deb .*ubuntu\/? {{ ansible_distribution_release }} main/ {print \$2; exit}" /etc/apt/sources.list'
|
||||||
|
register: ubuntu_repo_url
|
||||||
|
changed_when: false
|
||||||
|
when: nodepool.stat.exists | bool
|
||||||
|
delegate_to: localhost
|
||||||
|
- name: Set Ubuntu Cloud Archive repo URL based on discovered information
|
||||||
|
set_fact:
|
||||||
|
uca_apt_repo_url: "{{ ubuntu_repo_url.stdout | netorigin }}/ubuntu-cloud-archive"
|
||||||
|
when: nodepool.stat.exists | bool
|
||||||
roles:
|
roles:
|
||||||
- role: "{{ rolename | basename }}"
|
- role: "{{ rolename | basename }}"
|
||||||
post_tasks:
|
post_tasks:
|
||||||
|
@ -13,10 +13,10 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
# Ubuntu Cloud Archive variables
|
||||||
# There are no UCA packages for Trusty beyond Mitaka, so the selected
|
# There are no UCA packages for Trusty beyond Mitaka, so the selected
|
||||||
# release here has to remain at Mitaka.
|
# release here has to remain at Mitaka.
|
||||||
uca_openstack_release: mitaka
|
uca_openstack_release: mitaka
|
||||||
uca_apt_repo_url: "http://ubuntu-cloud.archive.canonical.com/ubuntu"
|
|
||||||
uca_repo_dist: "{{ ansible_lsb.codename }}-updates/{{ uca_openstack_release }}"
|
uca_repo_dist: "{{ ansible_lsb.codename }}-updates/{{ uca_openstack_release }}"
|
||||||
uca_repo: "deb {{ uca_apt_repo_url }} {{ uca_repo_dist }} main"
|
uca_repo: "deb {{ uca_apt_repo_url }} {{ uca_repo_dist }} main"
|
||||||
|
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
# Ubuntu Cloud Archive variables
|
||||||
uca_openstack_release: newton
|
uca_openstack_release: newton
|
||||||
uca_apt_repo_url: "http://ubuntu-cloud.archive.canonical.com/ubuntu"
|
|
||||||
uca_repo_dist: "{{ ansible_lsb.codename }}-updates/{{ uca_openstack_release }}"
|
uca_repo_dist: "{{ ansible_lsb.codename }}-updates/{{ uca_openstack_release }}"
|
||||||
uca_repo: "deb {{ uca_apt_repo_url }} {{ uca_repo_dist }} main"
|
uca_repo: "deb {{ uca_apt_repo_url }} {{ uca_repo_dist }} main"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user