summaryrefslogtreecommitdiffstats
path: root/xci/installer/osa/playbooks
diff options
context:
space:
mode:
authorFatih Degirmenci <fdegir@gmail.com>2018-03-20 20:16:56 +0100
committerFatih Degirmenci <fdegir@gmail.com>2018-03-21 10:54:58 +0100
commit8cb2bc0cdf0565ce59546b1ec2aac513fb7fecaa (patch)
tree977ce4af76bd6c74ebb4933491305578acfb0524 /xci/installer/osa/playbooks
parent0d332a80cf731e5927c81c9f6929a8b83d43cddd (diff)
Clean up opnfv ansible vars and switch to lowercase
This change removes the variables that are not used in any of the playbooks/roles from opnfv ansible vars. Apart from that, all caps ansible vars replaced with lowercase ones and impacted playbooks/roles are updated. installer-type:osa deploy-scenario:os-nosdn-nofeature Change-Id: I99ebdc155b3903176ac5940b64cef0c0f3aa0f0d Signed-off-by: Fatih Degirmenci <fdegir@gmail.com>
Diffstat (limited to 'xci/installer/osa/playbooks')
-rw-r--r--xci/installer/osa/playbooks/bootstrap-scenarios.yml10
-rw-r--r--xci/installer/osa/playbooks/configure-opnfvhost.yml76
-rw-r--r--xci/installer/osa/playbooks/configure-targethosts.yml10
3 files changed, 48 insertions, 48 deletions
diff --git a/xci/installer/osa/playbooks/bootstrap-scenarios.yml b/xci/installer/osa/playbooks/bootstrap-scenarios.yml
index 975c85c1..6546d5ce 100644
--- a/xci/installer/osa/playbooks/bootstrap-scenarios.yml
+++ b/xci/installer/osa/playbooks/bootstrap-scenarios.yml
@@ -7,21 +7,21 @@
# - 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'
diff --git a/xci/installer/osa/playbooks/configure-opnfvhost.yml b/xci/installer/osa/playbooks/configure-opnfvhost.yml
index 647f175b..3a904aed 100644
--- a/xci/installer/osa/playbooks/configure-opnfvhost.yml
+++ b/xci/installer/osa/playbooks/configure-opnfvhost.yml
@@ -10,8 +10,8 @@
- 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') }}"
@@ -25,17 +25,17 @@
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') }}"
@@ -50,71 +50,71 @@
- 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 }}"
@@ -125,9 +125,9 @@
- 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
@@ -154,7 +154,7 @@
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
@@ -162,12 +162,12 @@
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
@@ -175,9 +175,9 @@
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"
@@ -191,10 +191,10 @@
- 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
diff --git a/xci/installer/osa/playbooks/configure-targethosts.yml b/xci/installer/osa/playbooks/configure-targethosts.yml
index 42822c96..09258e7c 100644
--- a/xci/installer/osa/playbooks/configure-targethosts.yml
+++ b/xci/installer/osa/playbooks/configure-targethosts.yml
@@ -9,15 +9,15 @@
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') }}"
@@ -30,10 +30,10 @@
- "'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