summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartek Grzybowski <b.grzybowski@partner.samsung.com>2020-03-06 09:44:40 +0000
committerGerrit Code Review <gerrit@onap.org>2020-03-06 09:44:40 +0000
commitd0dbbca45c18a09dddf714453ca2c88bcd7a49f0 (patch)
tree9e11f7f7285258b8c431840bfeecf3f8c2153adf
parent52dc3d055d88f9f0e2a25a94dd5c94927b61c100 (diff)
parent255d066ef39b24fc0da8776ee7aaefedc4b812e7 (diff)
Merge "Specify Python in Ansible inventory template file"
-rw-r--r--ansible/ansible.cfg2
-rw-r--r--tools/cicdansible/roles/install/tasks/install.yml2
-rw-r--r--tools/cicdansible/roles/install/templates/inventory.yml.j23
3 files changed, 5 insertions, 2 deletions
diff --git a/ansible/ansible.cfg b/ansible/ansible.cfg
index 0978b814..b92f885f 100644
--- a/ansible/ansible.cfg
+++ b/ansible/ansible.cfg
@@ -1,9 +1,9 @@
[defaults]
-
# Define any custom roles used by applications installed by installer
# this parameter is telling ansible what additional folder it should
# browse while looking up for roles code
# relative path ./application is mapped into ansible container under
# /ansible/application where application roles should be found
roles_path = /ansible/application
+# Set log file
log_path = /ansible/log/ansible.log
diff --git a/tools/cicdansible/roles/install/tasks/install.yml b/tools/cicdansible/roles/install/tasks/install.yml
index 529e2acf..5c4bcd81 100644
--- a/tools/cicdansible/roles/install/tasks/install.yml
+++ b/tools/cicdansible/roles/install/tasks/install.yml
@@ -14,7 +14,7 @@
unarchive:
src: "resources/{{ hostvars[groups['resources'][0]].resources_sw_filename }}"
dest: "{{ installer_deploy_path }}"
-#Generate ansible inventory and extra vars.
+#Generate ansible inventory and extra vars
- name: "Generate ansible inventory for installer"
template:
src: inventory.yml.j2
diff --git a/tools/cicdansible/roles/install/templates/inventory.yml.j2 b/tools/cicdansible/roles/install/templates/inventory.yml.j2
index faec5903..9f7e08f8 100644
--- a/tools/cicdansible/roles/install/templates/inventory.yml.j2
+++ b/tools/cicdansible/roles/install/templates/inventory.yml.j2
@@ -1,5 +1,8 @@
all:
vars:
+{% if hostvars['infra'].ansible_distribution in ["Debian","Ubuntu"] %}
+ ansible_python_interpreter: "/usr/bin/python3"
+{% endif %}
ansible_ssh_private_key_file: /root/.ssh/id_rsa
ansible_ssh_common_args: "-o StrictHostKeyChecking=no"
children: