connection: local
gather_facts: true
vars_files:
- - "{{ XCI_PATH }}/xci/var/opnfv.yml"
+ - "{{ xci_path }}/xci/var/opnfv.yml"
pre_tasks:
- name: Load distribution variables
include_vars:
- file: "{{ XCI_PATH }}/xci/var/{{ ansible_os_family }}.yml"
+ file: "{{ xci_path }}/xci/var/{{ ansible_os_family }}.yml"
roles:
- role: clone-repository
project: "opnfv/bifrost"
- repo: "{{ OPENSTACK_BIFROST_GIT_URL }}"
- dest: "{{ XCI_CACHE }}/repos/bifrost"
- version: "{{ OPENSTACK_BIFROST_VERSION }}"
+ repo: "{{ openstack_bifrost_git_url }}"
+ dest: "{{ xci_cache }}/repos/bifrost"
+ version: "{{ openstack_bifrost_version }}"
tasks:
- name: Load distribution variables
include_vars:
- file: "{{ XCI_PATH }}/xci/var/{{ ansible_os_family }}.yml"
+ file: "{{ xci_path }}/xci/var/{{ ansible_os_family }}.yml"
- name: Synchronize local development bifrost repository to XCI paths
# command module is much faster than the copy module
synchronize:
- src: "{{ OPENSTACK_BIFROST_DEV_PATH }}"
- dest: "{{ XCI_CACHE }}/repos/bifrost"
+ src: "{{ openstack_bifrost_dev_path }}"
+ dest: "{{ xci_cache }}/repos/bifrost"
recursive: yes
delete: yes
when:
- - OPENSTACK_BIFROST_DEV_PATH != ""
+ - openstack_bifrost_dev_path != ""
- name: combine opnfv/releng-xci and openstack/bifrost scripts/playbooks
copy:
- src: "{{ XCI_PATH}}/xci/infra/bifrost/"
- dest: "{{ XCI_CACHE }}/repos/bifrost"
+ src: "{{ xci_path}}/xci/infra/bifrost/"
+ dest: "{{ xci_cache }}/repos/bifrost"
- hosts: opnfv
remote_user: root
vars_files:
- - "{{ XCI_PATH }}/xci/var/opnfv.yml"
+ - "{{ xci_path }}/xci/var/opnfv.yml"
tasks:
- name: Load distribution variables
include_vars:
file: "{{ item }}"
with_items:
- - "{{ XCI_PATH }}/xci/var/{{ ansible_os_family }}.yml"
+ - "{{ xci_path }}/xci/var/{{ ansible_os_family }}.yml"
- name: Set facts for remote deployment
set_fact:
remote_xci_path: "{{ ansible_env.HOME }}/releng-xci"
- remote_xci_flavor_files: "{{ ansible_env.HOME }}/releng-xci/xci/installer/{{ INSTALLER_TYPE }}/files/{{ XCI_FLAVOR }}"
+ remote_xci_flavor_files: "{{ ansible_env.HOME }}/releng-xci/xci/installer/{{ installer_type }}/files/{{ xci_flavor }}"
remote_xci_playbooks: "{{ ansible_env.HOME }}/releng-xci/xci/playbooks"
- name: Copy releng-xci to remote host
synchronize:
- src: "{{ XCI_PATH }}/"
+ src: "{{ xci_path }}/"
dest: "{{ remote_xci_path }}"
recursive: yes
delete: yes
creates: /root/.ssh/id_rsa
- name: add id_rsa.pub to authorized_keys
shell: cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys
- when: XCI_FLAVOR == 'aio'
+ when: xci_flavor == 'aio'
- name: fetch public key
fetch:
src: "{{ ansible_env.HOME }}/.ssh/id_rsa.pub"
- dest: "{{ XCI_PATH }}/xci/files/authorized_keys"
+ dest: "{{ xci_path }}/xci/files/authorized_keys"
flat: yes
- name: delete the opnfv_inventory directory
file:
name: "{{ kube_require_packages[ansible_pkg_mgr] }}"
state: present
update_cache: "{{ (ansible_pkg_mgr == 'apt') | ternary('yes', omit) }}"
- when: XCI_FLAVOR == 'aio'
+ when: xci_flavor == 'aio'
- name: change dashboard server type to NodePort
lineinfile:
- name: pip install ansible
pip:
name: ansible
- version: "{{ XCI_KUBE_ANSIBLE_PIP_VERSION }}"
+ version: "{{ xci_kube_ansible_pip_version }}"
- hosts: localhost
remote_user: root
vars_files:
- - "{{ XCI_PATH }}/xci/var/opnfv.yml"
+ - "{{ xci_path }}/xci/var/opnfv.yml"
tasks:
- name: Append public keys to authorized_keys
- shell: "/bin/cat {{ ansible_env.HOME }}/.ssh/id_rsa.pub >> {{ XCI_PATH }}/xci/files/authorized_keys"
+ shell: "/bin/cat {{ ansible_env.HOME }}/.ssh/id_rsa.pub >> {{ xci_path }}/xci/files/authorized_keys"
tasks:
- name: add public key to host
copy:
- src: "{{ XCI_PATH }}/xci/files/authorized_keys"
+ src: "{{ xci_path }}/xci/files/authorized_keys"
dest: /root/.ssh/authorized_keys
- name: Install required packages
package:
- hosts: kube-master
remote_user: root
vars_files:
- - "{{ XCI_PATH }}/xci/var/opnfv.yml"
+ - "{{ xci_path }}/xci/var/opnfv.yml"
pre_tasks:
- name: Load distribution variables
include_vars:
- file: "{{ XCI_PATH }}/xci/var/{{ ansible_os_family }}.yml"
+ file: "{{ xci_path }}/xci/var/{{ ansible_os_family }}.yml"
roles:
- role: "keepalived"
- when: XCI_FLAVOR == 'ha'
+ when: xci_flavor == 'ha'
- role: "haproxy_server"
haproxy_service_configs: "{{ haproxy_default_services}}"
- when: XCI_FLAVOR == 'ha'
+ when: xci_flavor == 'ha'
# - name: Include foobar role
# include_role:
# name: "foobar"
-# when: DEPLOY_SCENARIO == "foobar"
+# when: deploy_scenario == "foobar"
- name: Prepare everything to run the os-nosdn-nofeature scenario
include_role:
name: "os-nosdn-nofeature"
- when: DEPLOY_SCENARIO == 'os-nosdn-nofeature'
+ when: deploy_scenario == 'os-nosdn-nofeature'
- name: Prepare everything to run the os-odl-nofeature scenario
include_role:
name: "os-odl-nofeature"
- when: DEPLOY_SCENARIO == 'os-odl-nofeature'
+ when: deploy_scenario == 'os-odl-nofeature'
- name: Prepare everything to run the os-odl-sfc scenario
include_role:
name: "os-odl-sfc"
- when: DEPLOY_SCENARIO == 'os-odl-sfc'
+ when: deploy_scenario == 'os-odl-sfc'
- name: Prepare everything to run the os-odl-bgpvpn scenario
include_role:
name: "os-odl-bgpvpn"
- when: DEPLOY_SCENARIO == 'os-odl-bgpvpn'
+ when: deploy_scenario == 'os-odl-bgpvpn'
- hosts: opnfv
remote_user: root
vars_files:
- - "{{ XCI_PATH }}/xci/var/opnfv.yml"
- - "{{ XCI_PATH }}/xci/installer/osa/files/openstack_services.yml"
+ - "{{ xci_path }}/xci/var/opnfv.yml"
+ - "{{ xci_path }}/xci/installer/osa/files/openstack_services.yml"
environment:
http_proxy: "{{ lookup('env','http_proxy') }}"
include_vars:
file: "{{ item }}"
with_items:
- - "{{ XCI_PATH }}/xci/var/{{ ansible_os_family }}.yml"
- - "{{ XCI_FLAVOR_ANSIBLE_FILE_PATH }}/flavor-vars.yml"
+ - "{{ xci_path }}/xci/var/{{ ansible_os_family }}.yml"
+ - "{{ xci_flavor_ansible_file_path }}/flavor-vars.yml"
- name: Set facts for remote deployment
set_fact:
remote_xci_path: "{{ ansible_env.HOME }}/releng-xci"
- remote_xci_flavor_files: "{{ ansible_env.HOME }}/releng-xci/xci/installer/{{INSTALLER_TYPE}}/files/{{ XCI_FLAVOR }}"
+ remote_xci_flavor_files: "{{ ansible_env.HOME }}/releng-xci/xci/installer/{{installer_type}}/files/{{ xci_flavor }}"
remote_xci_playbooks: "{{ ansible_env.HOME }}/releng-xci/xci/playbooks"
roles:
- role: bootstrap-host
- configure_network: XCI_FLAVOR != 'aio'
+ configure_network: xci_flavor != 'aio'
- role: peru.proxy_settings
proxy_settings_http_proxy: "{{ lookup('env','http_proxy') }}"
proxy_settings_https_proxy: "{{ lookup('env','https_proxy') }}"
- name: fetch public key
fetch:
src: "{{ ansible_env.HOME }}/.ssh/id_rsa.pub"
- dest: "{{ XCI_PATH }}/xci/files/authorized_keys"
+ dest: "{{ xci_path }}/xci/files/authorized_keys"
flat: yes
- name: Copy releng-xci to remote host
synchronize:
- src: "{{ XCI_PATH }}/"
+ src: "{{ xci_path }}/"
dest: "{{ remote_xci_path }}"
recursive: yes
delete: yes
- name: copy flavor inventory
shell: "/bin/cp -rf {{ remote_xci_flavor_files }}/inventory {{ remote_xci_playbooks }}"
- name: copy openstack_deploy
- shell: "/bin/cp -rf {{OPENSTACK_OSA_PATH}}/etc/openstack_deploy {{OPENSTACK_OSA_ETC_PATH}}"
+ shell: "/bin/cp -rf {{openstack_osa_path}}/etc/openstack_deploy {{openstack_osa_etc_path}}"
- name: copy openstack_user_config.yml
- shell: "/bin/cp -rf {{ remote_xci_flavor_files }}/openstack_user_config.yml {{OPENSTACK_OSA_ETC_PATH}}"
+ shell: "/bin/cp -rf {{ remote_xci_flavor_files }}/openstack_user_config.yml {{openstack_osa_etc_path}}"
failed_when: false
- name: copy all user override files
- shell: "/bin/cp -rf {{ remote_xci_flavor_files }}/user_variables.yml {{OPENSTACK_OSA_ETC_PATH}}"
+ shell: "/bin/cp -rf {{ remote_xci_flavor_files }}/user_variables.yml {{openstack_osa_etc_path}}"
failed_when: false
- name: copy cinder.yml
- shell: "/bin/cp -rf {{ remote_xci_path }}/xci/installer/osa/files/cinder.yml {{OPENSTACK_OSA_ETC_PATH}}/env.d"
+ shell: "/bin/cp -rf {{ remote_xci_path }}/xci/installer/osa/files/cinder.yml {{openstack_osa_etc_path}}/env.d"
- name: Configure OpenStack-Ansible components
lineinfile:
- path: "{{ OPENSTACK_OSA_ETC_PATH }}/user_variables.yml"
+ path: "{{ openstack_osa_etc_path }}/user_variables.yml"
line: "{{ item.component }}: {{ item.value }}"
state: present
with_items:
- - { component: "tempest_install", value: "{{ RUN_TEMPEST | bool }}" }
- - { component: "tempest_run", value: "{{ RUN_TEMPEST | bool }}" }
- - { component: "core_openstack", value: "{{ CORE_OPENSTACK_INSTALL | bool }}" }
+ - { component: "tempest_install", value: "{{ run_tempest | bool }}" }
+ - { component: "tempest_run", value: "{{ run_tempest | bool }}" }
+ - { component: "core_openstack", value: "{{ core_openstack_install | bool }}" }
- block:
- name: copy ceph.yml
- shell: "/bin/cp -rf {{ remote_xci_flavor_files }}/ceph.yml {{OPENSTACK_OSA_ETC_PATH}}/conf.d/"
+ shell: "/bin/cp -rf {{ remote_xci_flavor_files }}/ceph.yml {{openstack_osa_etc_path}}/conf.d/"
- name: copy user_ceph.yml
- shell: "/bin/cp -rf {{ remote_xci_flavor_files }}/user_ceph.yml {{OPENSTACK_OSA_ETC_PATH}}/user_ceph.yml"
+ shell: "/bin/cp -rf {{ remote_xci_flavor_files }}/user_ceph.yml {{openstack_osa_etc_path}}/user_ceph.yml"
- name: copy user_variables_ceph.yml
- shell: "/bin/cp -rf {{ remote_xci_flavor_files }}/user_variables_ceph.yml {{OPENSTACK_OSA_ETC_PATH}}/user_variables_ceph.yml"
- when: XCI_CEPH_ENABLED == "true"
+ shell: "/bin/cp -rf {{ remote_xci_flavor_files }}/user_variables_ceph.yml {{openstack_osa_etc_path}}/user_variables_ceph.yml"
+ when: xci_ceph_enabled == "true"
- block:
- name: copy user_variables_proxy.yml
- shell: "/bin/cp -rf {{ remote_xci_path }}/xci/installer/osa/files/user_variables_proxy.yml {{OPENSTACK_OSA_ETC_PATH}}/user_variables_proxy.yml"
+ shell: "/bin/cp -rf {{ remote_xci_path }}/xci/installer/osa/files/user_variables_proxy.yml {{openstack_osa_etc_path}}/user_variables_proxy.yml"
- name: "Configure http_proxy_env_url"
lineinfile:
- path: "{{OPENSTACK_OSA_ETC_PATH}}/user_variables_proxy.yml"
+ path: "{{openstack_osa_etc_path}}/user_variables_proxy.yml"
regexp: "^http_proxy_env_url:.*"
line: "{{ 'http_proxy_env_url: ' + lookup('env','http_proxy') }}"
when:
- lookup('env','http_proxy') != "randomfoobarstring"
- name: copy OPNFV OpenStack playbook
- shell: "/bin/cp -rf {{ remote_xci_path }}/xci/installer/osa/files/setup-openstack.yml {{OPENSTACK_OSA_PATH}}/playbooks"
+ shell: "/bin/cp -rf {{ remote_xci_path }}/xci/installer/osa/files/setup-openstack.yml {{openstack_osa_path}}/playbooks"
- name: copy pinned versions of OSA Roles and global requirements
- shell: "/bin/cp -rf {{ remote_xci_path }}/xci/installer/osa/files/{{ item }} {{OPENSTACK_OSA_PATH}}/{{ item }}"
+ shell: "/bin/cp -rf {{ remote_xci_path }}/xci/installer/osa/files/{{ item }} {{openstack_osa_path}}/{{ item }}"
with_items:
- "ansible-role-requirements.yml"
- "global-requirement-pins.txt"
when:
- - OPENSTACK_OSA_VERSION != "master"
+ - openstack_osa_version != "master"
- name: copy pinned versions of OpenStack services
- shell: "/bin/cp -rf {{ remote_xci_path }}/xci/installer/osa/files/openstack_services.yml {{OPENSTACK_OSA_PATH}}/playbooks/defaults/repo_packages/openstack_services.yml"
+ shell: "/bin/cp -rf {{ remote_xci_path }}/xci/installer/osa/files/openstack_services.yml {{openstack_osa_path}}/playbooks/defaults/repo_packages/openstack_services.yml"
when:
- - OPENSTACK_OSA_VERSION != "master"
+ - openstack_osa_version != "master"
- include: bootstrap-scenarios.yml
- name: bootstrap ansible on opnfv host
command: "/bin/bash ./scripts/bootstrap-ansible.sh"
args:
- chdir: "{{OPENSTACK_OSA_PATH}}"
+ chdir: "{{openstack_osa_path}}"
- name: install opnfv pip required packages
pip:
name: "{{ item }}"
- python-neutronclient
- python-openstackclient
- name: generate password token
- command: "python pw-token-gen.py --file {{OPENSTACK_OSA_ETC_PATH}}/user_secrets.yml"
+ command: "python pw-token-gen.py --file {{openstack_osa_etc_path}}/user_secrets.yml"
args:
- chdir: "{{OPENSTACK_OSA_PATH}}/scripts"
+ chdir: "{{openstack_osa_path}}/scripts"
- name: check if certificate directory /etc/ssl/certs exists already
stat: path=/etc/ssl/certs
register: check_etc_ssl_certs
become: true
- name: fetch xci environment
copy:
- src: "{{ XCI_PATH }}/.cache/xci.env"
+ src: "{{ xci_path }}/.cache/xci.env"
dest: /root/xci.env
- hosts: localhost
tasks:
- name: Append public keys to authorized_keys
- shell: "/bin/cat {{ ansible_env.HOME }}/.ssh/id_rsa.pub >> {{ XCI_PATH }}/xci/files/authorized_keys"
+ shell: "/bin/cat {{ ansible_env.HOME }}/.ssh/id_rsa.pub >> {{ xci_path }}/xci/files/authorized_keys"
- hosts: opnfv
remote_user: root
vars_files:
- - "{{ XCI_PATH }}/xci/var/opnfv.yml"
+ - "{{ xci_path }}/xci/var/opnfv.yml"
pre_tasks:
- name: Load distribution variables
file: "{{ item }}"
failed_when: false
with_items:
- - "{{ XCI_PATH }}/xci/var/{{ ansible_os_family }}.yml"
- - "{{ XCI_FLAVOR_ANSIBLE_FILE_PATH }}/flavor-vars.yml"
- - "{{ XCI_FLAVOR_ANSIBLE_FILE_PATH }}/user_variables.yml"
+ - "{{ xci_path }}/xci/var/{{ ansible_os_family }}.yml"
+ - "{{ xci_flavor_ansible_file_path }}/flavor-vars.yml"
+ - "{{ xci_flavor_ansible_file_path }}/user_variables.yml"
roles:
- role: "openstack-ansible-openstack_openrc"
- name: fetch generated openrc
fetch:
src: "{{ ansible_env.HOME }}/openrc"
- dest: "{{ XCI_PATH }}/.cache/openrc"
+ dest: "{{ xci_path }}/.cache/openrc"
flat: true
- name: add public key to host
copy:
- src: "{{ XCI_PATH }}/xci/files/authorized_keys"
+ src: "{{ xci_path }}/xci/files/authorized_keys"
dest: /root/.ssh/authorized_keys
NO_PROXY: "{{ lookup('env','no_proxy') }}"
remote_user: root
vars_files:
- - "{{ XCI_PATH }}/xci/var/opnfv.yml"
+ - "{{ xci_path }}/xci/var/opnfv.yml"
pre_tasks:
- name: Load distribution variables
include_vars:
file: "{{ item }}"
with_items:
- - "{{ XCI_PATH }}/xci/var/{{ ansible_os_family }}.yml"
- - "{{ XCI_FLAVOR_ANSIBLE_FILE_PATH }}/flavor-vars.yml"
+ - "{{ xci_path }}/xci/var/{{ ansible_os_family }}.yml"
+ - "{{ xci_flavor_ansible_file_path }}/flavor-vars.yml"
roles:
- role: peru.proxy_settings
proxy_settings_http_proxy: "{{ lookup('env','http_proxy') }}"
- "'compute' in group_names"
- role: configure-ceph
when:
- - XCI_CEPH_ENABLED == "true"
+ - xci_ceph_enabled == "true"
- "'compute' in group_names"
tasks:
- name: add public key to host
copy:
- src: "{{ XCI_PATH }}/xci/files/authorized_keys"
+ src: "{{ xci_path }}/xci/files/authorized_keys"
dest: /root/.ssh/authorized_keys
file: "{{ item }}"
failed_when: false
with_items:
- - "{{ XCI_PATH }}/xci/var/opnfv.yml"
- - "{{ XCI_PATH }}/xci/var/{{ ansible_os_family }}.yml"
+ - "{{ xci_path }}/xci/var/opnfv.yml"
+ - "{{ xci_path }}/xci/var/{{ ansible_os_family }}.yml"
- name: cleanup leftovers of previous deployment
file:
state: absent
recurse: no
with_items:
- - "{{ XCI_CACHE }}/repos"
- - "{{ LOG_PATH }} "
- - "{{ OPNFV_SSH_HOST_KEYS_PATH }}"
+ - "{{ xci_cache }}/repos"
+ - "{{ log_path }} "
+ - "{{ opnfv_ssh_host_keys_path }}"
roles:
- role: clone-repository
project: "openstack/openstack-ansible-openstack_openrc"
- repo: "{{ OPENSTACK_OSA_OPENRC_GIT_URL }}"
+ repo: "{{ openstack_osa_openrc_git_url }}"
dest: roles/openstack-ansible-openstack_openrc
version: "master"
- when: INSTALLER_TYPE == "osa"
+ when: installer_type == "osa"
- role: clone-repository
project: "openstack/openstack-ansible"
- repo: "{{ OPENSTACK_OSA_GIT_URL }}"
- dest: "{{ XCI_CACHE }}/repos/openstack-ansible"
- version: "{{ OPENSTACK_OSA_VERSION }}"
- when: INSTALLER_TYPE == "osa"
+ repo: "{{ openstack_osa_git_url }}"
+ dest: "{{ xci_cache }}/repos/openstack-ansible"
+ version: "{{ openstack_osa_version }}"
+ when: installer_type == "osa"
- role: clone-repository
project: "kubernetes-incubator/kubespray"
- repo: "{{ KUBESPRAY_GIT_URL }}"
- dest: "{{ XCI_CACHE }}/repos/kubespray"
- version: "{{ KUBESPRAY_VERSION }}"
- when: INSTALLER_TYPE == "kubespray"
+ repo: "{{ kubespray_git_url }}"
+ dest: "{{ xci_cache }}/repos/kubespray"
+ version: "{{ kubespray_version }}"
+ when: installer_type == "kubespray"
- role: clone-repository
project: "openstack/openstack-ansible-haproxy_server"
- repo: "{{ OPENSTACK_OSA_HAPROXY_GIT_URL }}"
+ repo: "{{ openstack_osa_haproxy_git_url }}"
dest: roles/haproxy_server
- version: "{{ HAPROXY_VERSION }}"
+ version: "{{ haproxy_version }}"
when:
- - INSTALLER_TYPE == "kubespray"
+ - installer_type == "kubespray"
- role: clone-repository
project: "ansible-keepalived"
- repo: "{{ KEEPALIVED_GIT_URL }}"
+ repo: "{{ keepalived_git_url }}"
dest: roles/keepalived
- version: "{{ KEEPALIVED_VERSION }}"
+ version: "{{ keepalived_version }}"
when:
- - INSTALLER_TYPE == "kubespray"
+ - installer_type == "kubespray"
tasks:
- - name: create log directory {{LOG_PATH}}
+ - name: create log directory {{log_path}}
file:
- path: "{{LOG_PATH}}"
+ path: "{{log_path}}"
state: directory
recurse: no
- block:
path: "/etc/ssl/private"
state: directory
- name: generate self signed certificate
- command: openssl req -new -nodes -x509 -subj "{{ XCI_SSL_SUBJECT }}" -days 3650 -keyout "/etc/ssl/private/xci.key" -out "/etc/ssl/certs/xci.crt" -extensions v3_ca
+ command: openssl req -new -nodes -x509 -subj "{{ xci_ssl_subject }}" -days 3650 -keyout "/etc/ssl/private/xci.key" -out "/etc/ssl/certs/xci.crt" -extensions v3_ca
become: true
- name: Synchronize local development OSA repository to XCI paths
# command module is much faster than the copy module
synchronize:
- src: "{{ OPENSTACK_OSA_DEV_PATH }}"
- dest: "{{ XCI_CACHE }}/repos/openstack-ansible"
+ src: "{{ openstack_osa_dev_path }}"
+ dest: "{{ xci_cache }}/repos/openstack-ansible"
recursive: yes
delete: yes
when:
- - OPENSTACK_OSA_DEV_PATH != ""
+ - openstack_osa_dev_path != ""
when:
- - INSTALLER_TYPE == "osa"
+ - installer_type == "osa"
- name: Dump XCI execution environment to a file
- shell: env > "{{ XCI_PATH }}/.cache/xci.env"
+ shell: env > "{{ xci_path }}/.cache/xci.env"
args:
executable: /bin/bash
- name: Synchronize local changes to scenarios' master branch
synchronize:
- src: "{{ XCI_PATH }}/{{ item.item.role }}/"
+ src: "{{ xci_path }}/{{ item.item.role }}/"
dest: "{{ role_path_default }}/{{ item.item.scenario }}"
failed_when: false
when:
- name: Plug in the scenario to XCI (fallback)
synchronize:
- src: "{{ XCI_PATH }}/{{ item.item.role }}/"
+ src: "{{ xci_path }}/{{ item.item.role }}/"
dest: "{{ role_path_default }}/{{ item.item.scenario }}"
when: not item.stat.exists
with_items: "{{ scenarios_list_exists.results }}"
loop_control:
label: "{{ item.item.scenario }}"
- - name: Gather information about the selected {{ DEPLOY_SCENARIO }} scenario
+ - name: Gather information about the selected {{ deploy_scenario }} scenario
set_fact:
deploy_scenario: "{{ item }}"
with_items: "{{ scenarios }}"
loop_control:
label: "{{ item.scenario }}"
- when: DEPLOY_SCENARIO | lower == item.scenario
+ when: deploy_scenario | lower == item.scenario
- - name: Determine if the selected {{ DEPLOY_SCENARIO }} scenario can be deployed
+ - name: Determine if the selected {{ deploy_scenario }} scenario can be deployed
block:
- set_fact:
deploy_scenario_installer: "{{ item }}"
with_items: "{{ deploy_scenario.installers }}"
loop_control:
label: "{{ item.installer }}"
- when: item.installer == INSTALLER_TYPE
+ when: item.installer == installer_type
- set_fact:
- deploy_scenario_flavor: "{{ (XCI_FLAVOR in deploy_scenario_installer.flavors) | bool }}"
+ deploy_scenario_flavor: "{{ (xci_flavor in deploy_scenario_installer.flavors) | bool }}"
when:
- deploy_scenario_installer is defined
- deploy_scenario_installer
- set_fact:
- deploy_scenario_distro: "{{ (XCI_DISTRO in deploy_scenario_installer.distros) | bool }}"
+ deploy_scenario_distro: "{{ (xci_distro in deploy_scenario_installer.distros) | bool }}"
when:
- deploy_scenario_flavor is defined
- deploy_scenario_flavor
when: deploy_scenario is defined
- - name: Fail if {{ DEPLOY_SCENARIO }} is not supported
+ - name: Fail if {{ deploy_scenario }} is not supported
fail:
msg:
- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- - ERROR! The {{ DEPLOY_SCENARIO }} scenario can't be deployed. This is because
- - the {{ INSTALLER_TYPE }} XCI installer or the {{ XCI_FLAVOR }} flavor or the {{ XCI_DISTRO }}
+ - ERROR! The {{ deploy_scenario }} scenario can't be deployed. This is because
+ - the {{ installer_type }} XCI installer or the {{ xci_flavor }} flavor or the {{ xci_distro }}
- distribution is not supported by this scenario. It may also be possible that
- this scenario doesn't exist at all or it's not listed in {{ scenario_file }}.
- ''
ansible_python_interpreter: "/usr/bin/python"
scenarios: "{{ lookup('file', scenario_file) | from_yaml }}"
scenario_file: '../opnfv-scenario-requirements.yml'
- scenario_path_default: "{{ XCI_SCENARIOS_CACHE }}"
+ scenario_path_default: "{{ xci_scenarios_cache }}"
role_path_default: "{{ playbook_dir }}/roles"
git_clone_retries: 2
git_clone_retry_delay: 5
- name: copy user_variables_os-nosdn-nofeature.yml
copy:
src: "user_variables_os-nosdn-nofeature.yml"
- dest: "{{OPENSTACK_OSA_ETC_PATH}}/user_variables_os-nosdn-nofeature.yml"
+ dest: "{{openstack_osa_etc_path}}/user_variables_os-nosdn-nofeature.yml"
- name: copy os-nosdn-nofeature scenario specific openstack_user_config.yml
copy:
- src: "{{XCI_FLAVOR}}/openstack_user_config.yml"
- dest: "{{OPENSTACK_OSA_ETC_PATH}}/openstack_user_config.yml"
+ src: "{{xci_flavor}}/openstack_user_config.yml"
+ dest: "{{openstack_osa_etc_path}}/openstack_user_config.yml"
- name: copy user_variables_os-odl-nofeature.yml
copy:
src: "user_variables_os-odl-nofeature.yml"
- dest: "{{OPENSTACK_OSA_ETC_PATH}}/user_variables_os-odl-nofeature.yml"
+ dest: "{{openstack_osa_etc_path}}/user_variables_os-odl-nofeature.yml"
- name: copy user_variables_os-odl-nofeature-ha.yml
copy:
- src: "{{XCI_FLAVOR}}/user_variables_os-odl-nofeature-ha.yml"
- dest: "{{OPENSTACK_OSA_ETC_PATH}}/user_variables_os-odl-nofeature-ha.yml"
+ src: "{{xci_flavor}}/user_variables_os-odl-nofeature-ha.yml"
+ dest: "{{openstack_osa_etc_path}}/user_variables_os-odl-nofeature-ha.yml"
when:
- - XCI_FLAVOR == "ha"
+ - xci_flavor == "ha"
- name: copy os-odl-nofeature scenario specific openstack_user_config.yml
copy:
- src: "{{XCI_FLAVOR}}/openstack_user_config.yml"
- dest: "{{OPENSTACK_OSA_ETC_PATH}}/openstack_user_config.yml"
\ No newline at end of file
+ src: "{{xci_flavor}}/openstack_user_config.yml"
+ dest: "{{openstack_osa_etc_path}}/openstack_user_config.yml"
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-OPNFV_RELENG_GIT_URL: "{{ lookup('env','OPNFV_RELENG_GIT_URL') }}"
-OPNFV_RELENG_VERSION: "{{ lookup('env','OPNFV_RELENG_VERSION') }}"
-OPENSTACK_BIFROST_GIT_URL: "{{ lookup('env','OPENSTACK_BIFROST_GIT_URL') }}"
-OPENSTACK_BIFROST_DEV_PATH: "{{ lookup('env','OPENSTACK_BIFROST_DEV_PATH') }}"
-OPENSTACK_BIFROST_VERSION: "{{ lookup('env','OPENSTACK_BIFROST_VERSION') }}"
-OPENSTACK_OSA_GIT_URL: "{{ lookup('env','OPENSTACK_OSA_GIT_URL') }}"
-OPENSTACK_OSA_OPENRC_GIT_URL: "{{ lookup('env', 'OPENSTACK_OSA_OPENRC_GIT_URL') }}"
-OPENSTACK_OSA_PATH: "{{ lookup('env','OPENSTACK_OSA_PATH') }}"
-OPENSTACK_OSA_DEV_PATH: "{{ lookup('env','OPENSTACK_OSA_DEV_PATH') }}"
-OPENSTACK_OSA_VERSION: "{{ lookup('env','OPENSTACK_OSA_VERSION') }}"
-OPENSTACK_OSA_ETC_PATH: "{{ lookup('env','OPENSTACK_OSA_ETC_PATH') }}"
-XCI_ANSIBLE_PIP_VERSION: "{{ lookup('env','XCI_ANSIBLE_PIP_VERSION') }}"
-XCI_CACHE: "{{ lookup('env', 'XCI_CACHE') }}"
-XCI_FLAVOR: "{{ lookup('env','XCI_FLAVOR') }}"
-XCI_DISTRO: "{{ lookup('env', 'XCI_DISTRO') }}"
-XCI_FLAVOR_ANSIBLE_FILE_PATH: "{{ lookup('env','XCI_FLAVOR_ANSIBLE_FILE_PATH') }}"
-CI_LOOP: "{{ lookup('env','CI_LOOP') }}"
-XCI_PATH: "{{ lookup('env', 'XCI_PATH') }}"
-XCI_SCENARIOS_CACHE: "{{ lookup('env', 'XCI_SCENARIOS_CACHE') }}"
-LOG_PATH: "{{ lookup('env','LOG_PATH') }}"
-OPNFV_HOST_IP: "{{ lookup('env','OPNFV_HOST_IP') }}"
-OPNFV_SSH_HOST_KEYS_PATH: "{{ lookup('env', 'OPNFV_SSH_HOST_KEYS_PATH') }}"
-XCI_EXTRA_VARS_PATH: "{{ lookup('env', 'XCI_EXTRA_VARS_PATH') }}"
-XCI_SSL_SUBJECT: "{{ lookup('env', 'XCI_SSL_SUBJECT') }}"
-XCI_CEPH_ENABLED: "{{ lookup('env', 'XCI_CEPH_ENABLED') }}"
-RUN_TEMPEST: "{{ lookup('env', 'RUN_TEMPEST') }}"
-CORE_OPENSTACK_INSTALL: "{{ lookup('env', 'CORE_OPENSTACK_INSTALL') }}"
-DEPLOY_SCENARIO: "{{ lookup('env','DEPLOY_SCENARIO') }}"
-INSTALLER_TYPE: "{{ lookup('env','INSTALLER_TYPE') }}"
-KUBESPRAY_VERSION: "{{ lookup('env','KUBESPRAY_VERSION') }}"
-XCI_KUBE_ANSIBLE_PIP_VERSION: "{{ lookup('env','XCI_KUBE_ANSIBLE_PIP_VERSION') }}"
-KUBESPRAY_GIT_URL: "{{ lookup('env','KUBESPRAY_GIT_URL') }}"
-OPENSTACK_OSA_HAPROXY_GIT_URL: "{{ lookup('env','OPENSTACK_OSA_HAPROXY_GIT_URL') }}"
-HAPROXY_VERSION: "{{ lookup('env','HAPROXY_VERSION') }}"
-KEEPALIVED_GIT_URL: "{{ lookup('env','KEEPALIVED_GIT_URL') }}"
-KEEPALIVED_VERSION: "{{ lookup('env','KEEPALIVED_VERSION') }}"
+# This file is used for reflecting the environment variables set in various places
+# that are used in ansible playbooks/roles. Only the variables used within ansible
+# playbooks/roles should exist in this file.
+
+# openstack/bifrost variables
+openstack_bifrost_git_url: "{{ lookup('env','OPENSTACK_BIFROST_GIT_URL') }}"
+openstack_bifrost_version: "{{ lookup('env','OPENSTACK_BIFROST_VERSION') }}"
+openstack_bifrost_dev_path: "{{ lookup('env','OPENSTACK_BIFROST_DEV_PATH') }}"
+
+# openstack/openstack-ansible variables
+openstack_osa_git_url: "{{ lookup('env','OPENSTACK_OSA_GIT_URL') }}"
+openstack_osa_version: "{{ lookup('env','OPENSTACK_OSA_VERSION') }}"
+openstack_osa_dev_path: "{{ lookup('env','OPENSTACK_OSA_DEV_PATH') }}"
+openstack_osa_path: "{{ lookup('env','OPENSTACK_OSA_PATH') }}"
+openstack_osa_etc_path: "{{ lookup('env','OPENSTACK_OSA_ETC_PATH') }}"
+openstack_osa_openrc_git_url: "{{ lookup('env', 'OPENSTACK_OSA_OPENRC_GIT_URL') }}"
+openstack_osa_haproxy_git_url: "{{ lookup('env','OPENSTACK_OSA_HAPROXY_GIT_URL') }}"
+
+# kubespray variables
+kubespray_git_url: "{{ lookup('env','KUBESPRAY_GIT_URL') }}"
+kubespray_version: "{{ lookup('env','KUBESPRAY_VERSION') }}"
+xci_kube_ansible_pip_version: "{{ lookup('env','XCI_KUBE_ANSIBLE_PIP_VERSION') }}"
+
+# variables for other components
+keepalived_git_url: "{{ lookup('env','KEEPALIVED_GIT_URL') }}"
+haproxy_version: "{{ lookup('env','HAPROXY_VERSION') }}"
+keepalived_version: "{{ lookup('env','KEEPALIVED_VERSION') }}"
+
+# xci variables
+xci_cache: "{{ lookup('env', 'XCI_CACHE') }}"
+xci_flavor: "{{ lookup('env','XCI_FLAVOR') }}"
+xci_flavor_ansible_file_path: "{{ lookup('env','XCI_FLAVOR_ANSIBLE_FILE_PATH') }}"
+xci_distro: "{{ lookup('env', 'XCI_DISTRO') }}"
+xci_scenarios_cache: "{{ lookup('env', 'XCI_SCENARIOS_CACHE') }}"
+xci_ssl_subject: "{{ lookup('env', 'XCI_SSL_SUBJECT') }}"
+xci_ceph_enabled: "{{ lookup('env', 'XCI_CEPH_ENABLED') }}"
+log_path: "{{ lookup('env','LOG_PATH') }}"
+opnfv_ssh_host_keys_path: "{{ lookup('env', 'OPNFV_SSH_HOST_KEYS_PATH') }}"
+run_tempest: "{{ lookup('env', 'RUN_TEMPEST') }}"
+core_openstack_install: "{{ lookup('env', 'CORE_OPENSTACK_INSTALL') }}"
+deploy_scenario: "{{ lookup('env','DEPLOY_SCENARIO') }}"
+installer_type: "{{ lookup('env','INSTALLER_TYPE') }}"
# source xci configuration
source $XCI_PATH/xci/config/env-vars
# Make sure we pass XCI_PATH everywhere
-export XCI_ANSIBLE_PARAMS+=" -e XCI_PATH=${XCI_PATH}"
+export XCI_ANSIBLE_PARAMS+=" -e xci_path=${XCI_PATH}"
# Make sure everybody knows where our global roles are
export ANSIBLE_ROLES_PATH="$HOME/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:${XCI_PATH}/xci/playbooks/roles"