aboutsummaryrefslogtreecommitdiffstats
path: root/resources/ansible_roles/qtip-generator
diff options
context:
space:
mode:
Diffstat (limited to 'resources/ansible_roles/qtip-generator')
-rw-r--r--resources/ansible_roles/qtip-generator/files/compute/run.yml10
-rw-r--r--resources/ansible_roles/qtip-generator/files/compute/setup.yml9
2 files changed, 16 insertions, 3 deletions
diff --git a/resources/ansible_roles/qtip-generator/files/compute/run.yml b/resources/ansible_roles/qtip-generator/files/compute/run.yml
index f8e71f0c..59f84c3f 100644
--- a/resources/ansible_roles/qtip-generator/files/compute/run.yml
+++ b/resources/ansible_roles/qtip-generator/files/compute/run.yml
@@ -18,6 +18,16 @@
- hosts: SUT
+{% if sut == 'vnf' %}
+ gather_facts: no
+ pre_tasks:
+ - name: check whether install python 2 in target
+ become: yes
+ raw: test -e /usr/bin/python || (apt-get -y update && apt-get install -y python-minimal)
+ - name: gather facts
+ setup:
+{% endif %}
+
roles:
# prepare environment
- { role: qtip, tasks: setup-node, tags: [setup] }
diff --git a/resources/ansible_roles/qtip-generator/files/compute/setup.yml b/resources/ansible_roles/qtip-generator/files/compute/setup.yml
index 037f5746..c3e8f58e 100644
--- a/resources/ansible_roles/qtip-generator/files/compute/setup.yml
+++ b/resources/ansible_roles/qtip-generator/files/compute/setup.yml
@@ -16,15 +16,18 @@
gather_facts: no
roles:
- { role: openstack, external_network: {{ network_group[installer_type] }}, heat_template: heat_template.yml }
-{% endif %}
+
+{% elif sut == 'node' %}
{% if installer_type == 'manual' %}
- hosts: localhost
gather_facts: no
tasks:
- - debug: "msg='please add hosts to SUT group in `hosts` file manually.'"
+ - debug: "msg='please add hosts to SUT group in `hosts` file manually.'"
+
{% else %}
- hosts: [{{ installer_group[installer_type] }}]
roles:
- - { role: qtip, tasks: generate-inventory }
+ - { role: qtip, tasks: generate-inventory }
+{% endif %}
{% endif %}