summaryrefslogtreecommitdiffstats
path: root/xci/installer/kubespray/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/kubespray/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/kubespray/playbooks')
-rw-r--r--xci/installer/kubespray/playbooks/configure-opnfvhost.yml20
-rw-r--r--xci/installer/kubespray/playbooks/configure-targethosts.yml10
2 files changed, 15 insertions, 15 deletions
diff --git a/xci/installer/kubespray/playbooks/configure-opnfvhost.yml b/xci/installer/kubespray/playbooks/configure-opnfvhost.yml
index d6e1d7b8..8166b0e5 100644
--- a/xci/installer/kubespray/playbooks/configure-opnfvhost.yml
+++ b/xci/installer/kubespray/playbooks/configure-opnfvhost.yml
@@ -9,23 +9,23 @@
- 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
@@ -36,11 +36,11 @@
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:
@@ -61,7 +61,7 @@
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:
@@ -72,13 +72,13 @@
- 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"
diff --git a/xci/installer/kubespray/playbooks/configure-targethosts.yml b/xci/installer/kubespray/playbooks/configure-targethosts.yml
index 08c735b4..d89cd334 100644
--- a/xci/installer/kubespray/playbooks/configure-targethosts.yml
+++ b/xci/installer/kubespray/playbooks/configure-targethosts.yml
@@ -4,7 +4,7 @@
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:
@@ -15,14 +15,14 @@
- 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'