![Jesse Pretorius](/assets/img/avatar_default.png)
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 variable is moved from the role vars to the role defaults. The uca_openstack_release var is also changed for Ubuntu 16.04 to 'newton' in order to match the current cycle appropriately. A note is added to the Ubuntu 14.04 vars to make it clear that there will never be a Newton UCA release for Trusty. A small correction to the task description which sets the URL for the AIO build in OpenStack-CI is also made to be more accurate. Change-Id: I35b8e99e6e3f127ca507907d6480542b91a4107d
136 lines
4.3 KiB
YAML
136 lines
4.3 KiB
YAML
---
|
|
# Copyright 2015, 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: Create the required deployment directories
|
|
file:
|
|
path: "{{ item }}"
|
|
state: directory
|
|
with_items:
|
|
- "/etc/openstack_deploy/"
|
|
- "/etc/openstack_deploy/conf.d"
|
|
tags:
|
|
- create-directories
|
|
|
|
|
|
# NOTICE(cloudnull) The ceilometer and aodh inclusion for the gate has been removed.
|
|
# We need to add these lines back as soon as the gate stabalizes.
|
|
# - - name: aodh.yml.aio
|
|
# - override: "{{ aodh_conf_overrides | default({}) }}"
|
|
# - - name: ceilometer.yml.aio
|
|
# - override: "{{ ceilometer_conf_overrides | default({}) }}"
|
|
- name: Deploy user conf.d configuration
|
|
config_template:
|
|
src: "../etc/openstack_deploy/conf.d/{{ item.name }}"
|
|
dest: "/etc/openstack_deploy/conf.d/{{ item.name | regex_replace('.aio$', '') }}"
|
|
config_overrides: "{{ item.override }}"
|
|
config_type: "yaml"
|
|
with_items:
|
|
- name: swift.yml.aio
|
|
override: "{{ swift_conf_overrides | default({}) }}"
|
|
tags:
|
|
- deploy-confd
|
|
|
|
- name: Deploy openstack_user_config
|
|
config_template:
|
|
src: "../etc/openstack_deploy/openstack_user_config.yml.aio"
|
|
dest: "/etc/openstack_deploy/openstack_user_config.yml"
|
|
config_overrides: "{{ openstack_user_config_overrides | default({}) }}"
|
|
config_type: "yaml"
|
|
tags:
|
|
- deploy-openstack-user-config
|
|
|
|
- name: Deploy user_secrets file
|
|
config_template:
|
|
src: "../etc/openstack_deploy/user_secrets.yml"
|
|
dest: "/etc/openstack_deploy/user_secrets.yml"
|
|
config_overrides: "{{ user_secrets_overrides | default({}) }}"
|
|
config_type: "yaml"
|
|
tags:
|
|
- deploy-user-secrets
|
|
|
|
- name: Generate any missing values in user_secrets
|
|
shell: ../scripts/pw-token-gen.py --file /etc/openstack_deploy/user_secrets.yml
|
|
tags:
|
|
- generate_secrets
|
|
|
|
- name: Detect whether the host is an OpenStack-CI host
|
|
stat:
|
|
path: /etc/nodepool
|
|
register: nodepool_dir
|
|
|
|
- name: Set the UCA repository URL in OpenStack-CI
|
|
set_fact:
|
|
uca_apt_repo_url: "{{ bootstrap_host_ubuntu_repo | netorigin }}/ubuntu-cloud-archive"
|
|
when:
|
|
- nodepool_dir.stat.exists
|
|
- bootstrap_host_ubuntu_repo is defined
|
|
|
|
- name: Determine if the host has a global pip config file
|
|
stat:
|
|
path: /etc/pip.conf
|
|
register: pip_conf_file
|
|
|
|
- name: Determine the fastest available OpenStack-Infra wheel mirror
|
|
shell: ../scripts/fastest-infra-wheel-mirror.py
|
|
register: fastest_wheel_mirror
|
|
when: not pip_conf_file.stat.exists
|
|
|
|
- name: Set repo_build_pip_extra_indexes fact
|
|
set_fact:
|
|
repo_build_pip_extra_indexes: "[\"{{ fastest_wheel_mirror.stdout }}\"]"
|
|
when: not pip_conf_file.stat.exists
|
|
|
|
- name: Set the user_variables
|
|
config_template:
|
|
src: user_variables.aio.yml.j2
|
|
dest: /etc/openstack_deploy/user_variables.yml
|
|
config_overrides: "{{ user_variables_overrides | default({}) }}"
|
|
config_type: yaml
|
|
|
|
- name: Add user_conf_files to contain the list of files to copy into containers
|
|
file:
|
|
path: /etc/openstack_deploy/user_conf_files.yml
|
|
state: touch
|
|
when: pip_conf_file.stat.exists
|
|
tags:
|
|
- container-conf-files
|
|
|
|
- name: Ensure that the first line in user_conf_files is correct
|
|
lineinfile:
|
|
dest: /etc/openstack_deploy/user_conf_files.yml
|
|
line: "---"
|
|
insertbefore: BOF
|
|
when: pip_conf_file.stat.exists
|
|
tags:
|
|
- container-conf-files
|
|
|
|
- name: Ensure that the second line in user_conf_files is correct
|
|
lineinfile:
|
|
dest: /etc/openstack_deploy/user_conf_files.yml
|
|
line: "lxc_container_cache_files:"
|
|
insertafter: "^---"
|
|
when: pip_conf_file.stat.exists
|
|
tags:
|
|
- container-conf-files
|
|
|
|
- name: Add the dict to copy the global pip config file into user_conf_files
|
|
lineinfile:
|
|
dest: /etc/openstack_deploy/user_conf_files.yml
|
|
line: " - { src: '/etc/pip.conf', dest: '/etc/pip.conf' }"
|
|
when: pip_conf_file.stat.exists
|
|
tags:
|
|
- container-conf-files
|