diff options
Diffstat (limited to 'xci/playbooks')
-rw-r--r-- | xci/playbooks/configure-localhost.yml | 58 | ||||
-rw-r--r-- | xci/playbooks/get-opnfv-scenario-requirements.yml | 24 |
2 files changed, 41 insertions, 41 deletions
diff --git a/xci/playbooks/configure-localhost.yml b/xci/playbooks/configure-localhost.yml index 0e3cde6e..c8a9840c 100644 --- a/xci/playbooks/configure-localhost.yml +++ b/xci/playbooks/configure-localhost.yml @@ -16,8 +16,8 @@ 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: @@ -25,48 +25,48 @@ 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: @@ -85,21 +85,21 @@ 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 diff --git a/xci/playbooks/get-opnfv-scenario-requirements.yml b/xci/playbooks/get-opnfv-scenario-requirements.yml index 0615fde1..6937b47e 100644 --- a/xci/playbooks/get-opnfv-scenario-requirements.yml +++ b/xci/playbooks/get-opnfv-scenario-requirements.yml @@ -76,7 +76,7 @@ - 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: @@ -88,47 +88,47 @@ - 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 }}. - '' @@ -144,7 +144,7 @@ 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 |