summaryrefslogtreecommitdiffstats
path: root/resources/ansible_roles
diff options
context:
space:
mode:
authorYujun Zhang <zhang.yujunz@zte.com.cn>2017-06-05 21:51:51 +0800
committerYujun Zhang <zhang.yujunz@zte.com.cn>2017-06-05 23:46:33 +0800
commitcb3795a39882bb97c15ae5c9562faf577334399b (patch)
tree6bbd1d366b1e214bed87398ff7a1db102c607459 /resources/ansible_roles
parent0ce21bc2fc83faa3462de9fd52360cb0d6fae71d (diff)
Beautify the argument names
- keep the argument consisten with OPNFV convention - installer-ip is not used because in fact we use host address instead - remove optional argurment from prompt Change-Id: I3db3cf53b62cc86e143bc59a7dd8bb83d0f74b7d Signed-off-by: Yujun Zhang <zhang.yujunz@zte.com.cn>
Diffstat (limited to 'resources/ansible_roles')
-rw-r--r--resources/ansible_roles/qtip-generator/defaults/main.yml7
-rw-r--r--resources/ansible_roles/qtip-generator/files/compute/group_vars/all.yml8
-rw-r--r--resources/ansible_roles/qtip-generator/files/compute/hosts6
-rw-r--r--resources/ansible_roles/qtip-generator/files/compute/setup.yml4
-rw-r--r--resources/ansible_roles/qtip-generator/files/compute/templates/hosts4
-rw-r--r--resources/ansible_roles/qtip-generator/files/compute/templates/ssh.cfg2
-rw-r--r--resources/ansible_roles/qtip/tasks/generate-inventory.yml2
7 files changed, 16 insertions, 17 deletions
diff --git a/resources/ansible_roles/qtip-generator/defaults/main.yml b/resources/ansible_roles/qtip-generator/defaults/main.yml
index 846b5169..527da6f7 100644
--- a/resources/ansible_roles/qtip-generator/defaults/main.yml
+++ b/resources/ansible_roles/qtip-generator/defaults/main.yml
@@ -7,11 +7,10 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-installer: fuel
+installer_type: fuel
+installer_host: fuel-master
-installer_master_host: fuel-master
-
-installer_master_group:
+installer_group:
manual: dummy-group
fuel: fuel-masters
apex: apex-underclouds
diff --git a/resources/ansible_roles/qtip-generator/files/compute/group_vars/all.yml b/resources/ansible_roles/qtip-generator/files/compute/group_vars/all.yml
index 3d41e1b4..8b90b498 100644
--- a/resources/ansible_roles/qtip-generator/files/compute/group_vars/all.yml
+++ b/resources/ansible_roles/qtip-generator/files/compute/group_vars/all.yml
@@ -13,10 +13,10 @@ qtip_fixtures: fixtures
qtip_dump: dump
qtip_cache: "{{ qtip_cache }}"
qtip_workdir: "{% raw %}{{ ansible_env.HOME }}{% endraw %}/qtip-workdir-{{ lookup('pipe', 'date +%Y%m%d-%H%M') }}"
-installer_master_group:
+
+installer_type: "{{ installer_type }}"
+installer_host: "{{ installer_host }}"
+installer_group:
manual: dummy-group
fuel: fuel-masters
apex: apex-underclouds
-
-installer: "{{ installer }}"
-installer_master_host: "{{ installer_master_host }}"
diff --git a/resources/ansible_roles/qtip-generator/files/compute/hosts b/resources/ansible_roles/qtip-generator/files/compute/hosts
index 9a5f831b..0347e450 100644
--- a/resources/ansible_roles/qtip-generator/files/compute/hosts
+++ b/resources/ansible_roles/qtip-generator/files/compute/hosts
@@ -1,8 +1,8 @@
localhost ansible_connection=local
-{% if installer != 'manual' %}
-[{{ installer_master_group[installer] }}]
-{{ installer_master_host }}
+{% if installer_type != 'manual' %}
+[{{ installer_group[installer_type] }}]
+{{ installer_host }}
{% else %}
[SUT]
# Add hosts in system under test, example::
diff --git a/resources/ansible_roles/qtip-generator/files/compute/setup.yml b/resources/ansible_roles/qtip-generator/files/compute/setup.yml
index d165a9fe..d1ab2638 100644
--- a/resources/ansible_roles/qtip-generator/files/compute/setup.yml
+++ b/resources/ansible_roles/qtip-generator/files/compute/setup.yml
@@ -10,13 +10,13 @@
# Prepare connection to SUT (System Under Test)
---
-{% if installer == 'manual' %}
+{% if installer_type == 'manual' %}
- hosts: localhost
gather_facts: no
tasks:
- debug: "msg='please add hosts to SUT group in `hosts` file manually.'"
{% else %}
-- hosts: [{{ installer_master_group[installer] }}]
+- hosts: [{{ installer_group[installer_type] }}]
gather_facts: no
roles:
- { role: qtip, tasks: generate-inventory }
diff --git a/resources/ansible_roles/qtip-generator/files/compute/templates/hosts b/resources/ansible_roles/qtip-generator/files/compute/templates/hosts
index 34e4aa92..49920006 100644
--- a/resources/ansible_roles/qtip-generator/files/compute/templates/hosts
+++ b/resources/ansible_roles/qtip-generator/files/compute/templates/hosts
@@ -1,8 +1,8 @@
{% raw %}
localhost ansible_connection=local
-[{{ installer_master_group[installer] }}]
-{{ installer_master_host }}
+[{{ installer_group[installer_type] }}]
+{{ installer_host }}
[SUT:children] # system under test
compute
diff --git a/resources/ansible_roles/qtip-generator/files/compute/templates/ssh.cfg b/resources/ansible_roles/qtip-generator/files/compute/templates/ssh.cfg
index 67246054..f0e33fd4 100644
--- a/resources/ansible_roles/qtip-generator/files/compute/templates/ssh.cfg
+++ b/resources/ansible_roles/qtip-generator/files/compute/templates/ssh.cfg
@@ -10,7 +10,7 @@
Host {{ name }}
HostName {{ host.ansible_ssh_host }}
User root
- ProxyCommand ssh -o 'ForwardAgent yes' {{ installer_master_host }} 'ssh-add && nc %h %p'
+ ProxyCommand ssh -o 'ForwardAgent yes' {{ installer_host }} 'ssh-add && nc %h %p'
{% endfor %}
{% endraw %} \ No newline at end of file
diff --git a/resources/ansible_roles/qtip/tasks/generate-inventory.yml b/resources/ansible_roles/qtip/tasks/generate-inventory.yml
index f19b0447..aee25260 100644
--- a/resources/ansible_roles/qtip/tasks/generate-inventory.yml
+++ b/resources/ansible_roles/qtip/tasks/generate-inventory.yml
@@ -11,7 +11,7 @@
---
-- include: "gather-facts-{{ installer }}.yml"
+- include: "gather-facts-{{ installer_type }}.yml"
- name: generating inventory file
template: src=templates/hosts dest=./hosts