summaryrefslogtreecommitdiffstats
path: root/deploy
diff options
context:
space:
mode:
authorHU Xinhui <xinhui_hu@foxmail.com>2018-01-27 02:59:48 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-01-27 02:59:48 +0000
commita3e5685e01696a85550c13ef7326b3103b8123ff (patch)
tree598b4d32ac5e5e0b4118aa41a822f88e130e12b8 /deploy
parent7ada56d26b881fc4f4adae82511ae94c315b0cc3 (diff)
parent280b401e7eb80b1ef47b0bfbc694e27930b096a2 (diff)
Merge "Use run_dir instead of hard coding"
Diffstat (limited to 'deploy')
-rw-r--r--deploy/adapters/ansible/kubernetes/roles/kargo/tasks/main.yml2
-rw-r--r--deploy/adapters/ansible/roles/setup-host/tasks/main.yml12
-rw-r--r--deploy/adapters/ansible/roles/setup-infrastructure/tasks/main.yml2
-rw-r--r--deploy/adapters/ansible/roles/setup-openstack/tasks/main.yml2
-rw-r--r--deploy/compass_conf/templates/ansible_installer/kubernetes/vars/ansible-kubernetes.tmpl2
5 files changed, 11 insertions, 9 deletions
diff --git a/deploy/adapters/ansible/kubernetes/roles/kargo/tasks/main.yml b/deploy/adapters/ansible/kubernetes/roles/kargo/tasks/main.yml
index 8a78c68d..af52ad04 100644
--- a/deploy/adapters/ansible/kubernetes/roles/kargo/tasks/main.yml
+++ b/deploy/adapters/ansible/kubernetes/roles/kargo/tasks/main.yml
@@ -67,7 +67,7 @@
- name: copy inventoriy.json file
copy:
- src: /var/ansible/run/kubernetes-opnfv2/inventories/inventory.json
+ src: "{{ run_dir }}/inventories/inventory.json"
dest: /tmp/inventory.json
tags:
- ansible
diff --git a/deploy/adapters/ansible/roles/setup-host/tasks/main.yml b/deploy/adapters/ansible/roles/setup-host/tasks/main.yml
index 4eba3d00..0a63f7f5 100644
--- a/deploy/adapters/ansible/roles/setup-host/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/setup-host/tasks/main.yml
@@ -10,7 +10,7 @@
---
- name: openstack-hosts-setup
- shell: "export ANSIBLE_LOG_PATH=/var/ansible/run/openstack_pike-opnfv2/ansible.log; \
+ shell: "export ANSIBLE_LOG_PATH={{ run_dir }}/ansible.log; \
export ANSIBLE_SCP_IF_SSH=y; \
cd /opt/openstack-ansible/playbooks; \
openstack-ansible openstack-hosts-setup.yml \
@@ -25,7 +25,7 @@
when: openstack_hosts_setup_result.stdout.find('Mark openstack-hosts-setup completed') == -1
- name: security-hardening
- shell: "export ANSIBLE_LOG_PATH=/var/ansible/run/openstack_pike-opnfv2/ansible.log; \
+ shell: "export ANSIBLE_LOG_PATH={{ run_dir }}/ansible.log; \
export ANSIBLE_SCP_IF_SSH=y; \
cd /opt/openstack-ansible/playbooks; \
openstack-ansible security-hardening.yml \
@@ -40,7 +40,7 @@
when: security_hardening_result.stdout.find('Mark security-hardening completed') == -1
- name: lxc-hosts-setup
- shell: "export ANSIBLE_LOG_PATH=/var/ansible/run/openstack_pike-opnfv2/ansible.log; \
+ shell: "export ANSIBLE_LOG_PATH={{ run_dir }}/ansible.log; \
export ANSIBLE_SCP_IF_SSH=y; \
cd /opt/openstack-ansible/playbooks; \
openstack-ansible lxc-hosts-setup.yml \
@@ -55,7 +55,7 @@
when: lxc_hosts_setup_result.stdout.find('Mark lxc-hosts-setup completed') == -1
- name: lxc-containers-create
- shell: "export ANSIBLE_LOG_PATH=/var/ansible/run/openstack_pike-opnfv2/ansible.log; \
+ shell: "export ANSIBLE_LOG_PATH={{ run_dir }}/ansible.log; \
export ANSIBLE_SCP_IF_SSH=y; \
cd /opt/openstack-ansible/playbooks; \
openstack-ansible lxc-containers-create.yml \
@@ -66,7 +66,7 @@
register: failed_container
- name: destroy the failed_container
- shell: "export ANSIBLE_LOG_PATH=/var/ansible/run/openstack_pike-opnfv2/ansible.log; \
+ shell: "export ANSIBLE_LOG_PATH={{ run_dir }}/ansible.log; \
export ANSIBLE_SCP_IF_SSH=y; \
cd /opt/openstack-ansible/playbooks; \
openstack-ansible lxc-containers-destroy.yml \
@@ -77,7 +77,7 @@
ignore_errors: "True"
- name: retry to setup failed_container
- shell: "export ANSIBLE_LOG_PATH=/var/ansible/run/openstack_pike-opnfv2/ansible.log; \
+ shell: "export ANSIBLE_LOG_PATH={{ run_dir }}/ansible.log; \
export ANSIBLE_SCP_IF_SSH=y; \
cd /opt/openstack-ansible/playbooks; \
openstack-ansible lxc-containers-create.yml --limit {{item}} \
diff --git a/deploy/adapters/ansible/roles/setup-infrastructure/tasks/main.yml b/deploy/adapters/ansible/roles/setup-infrastructure/tasks/main.yml
index 7cf5c86f..4e3a926f 100644
--- a/deploy/adapters/ansible/roles/setup-infrastructure/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/setup-infrastructure/tasks/main.yml
@@ -8,7 +8,7 @@
##############################################################################
---
- name: setup infrastructure
- shell: "export ANSIBLE_LOG_PATH=/var/ansible/run/openstack_pike-opnfv2/ansible.log; \
+ shell: "export ANSIBLE_LOG_PATH={{ run_dir }}/ansible.log; \
export ANSIBLE_SCP_IF_SSH=y; \
cd /opt/openstack-ansible/playbooks; \
openstack-ansible setup-infrastructure.yml \
diff --git a/deploy/adapters/ansible/roles/setup-openstack/tasks/main.yml b/deploy/adapters/ansible/roles/setup-openstack/tasks/main.yml
index a6ecb82f..c572936d 100644
--- a/deploy/adapters/ansible/roles/setup-openstack/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/setup-openstack/tasks/main.yml
@@ -8,7 +8,7 @@
##############################################################################
---
- name: setup openstack
- shell: "export ANSIBLE_LOG_PATH=/var/ansible/run/openstack_pike-opnfv2/ansible.log; \
+ shell: "export ANSIBLE_LOG_PATH={{ run_dir }}/ansible.log; \
export ANSIBLE_SCP_IF_SSH=y; \
cd /opt/openstack-ansible/playbooks; \
openstack-ansible setup-openstack.yml \
diff --git a/deploy/compass_conf/templates/ansible_installer/kubernetes/vars/ansible-kubernetes.tmpl b/deploy/compass_conf/templates/ansible_installer/kubernetes/vars/ansible-kubernetes.tmpl
index ff4d587c..f132365a 100644
--- a/deploy/compass_conf/templates/ansible_installer/kubernetes/vars/ansible-kubernetes.tmpl
+++ b/deploy/compass_conf/templates/ansible_installer/kubernetes/vars/ansible-kubernetes.tmpl
@@ -23,6 +23,8 @@
#set kube_masters = $getVar('kube_master', [])
#set kube_nodes = $getVar('kube_node', [])
+run_dir: $getVar('run_dir', '')
+
enable_secgroup: $getVar('enable_secgroup', True)
enable_fwaas: $getVar('enable_fwaas', True)
enable_vpnaas: $getVar('enable_vpnaas', True)