aboutsummaryrefslogtreecommitdiffstats
path: root/resources
diff options
context:
space:
mode:
authorYujun Zhang <zhang.yujunz@zte.com.cn>2017-05-15 15:02:40 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-05-15 15:02:40 +0000
commit4f9a0d9f7c60a9e69864469e1254af6269ef3d9a (patch)
tree485368f5d5b58c6b6606bae9a128224c51efd27a /resources
parent0af297e4e9622cb6d040e9e30daffe1d43970aaa (diff)
parent1eea41c057f24f97248a860a8fc25b3fa9847209 (diff)
Merge "Check ssh-agent before running tests. Fail playbook if not running."
Diffstat (limited to 'resources')
-rw-r--r--resources/ansible_roles/qtip/tasks/setup-local.yml14
1 files changed, 14 insertions, 0 deletions
diff --git a/resources/ansible_roles/qtip/tasks/setup-local.yml b/resources/ansible_roles/qtip/tasks/setup-local.yml
index f5f83278..a177d520 100644
--- a/resources/ansible_roles/qtip/tasks/setup-local.yml
+++ b/resources/ansible_roles/qtip/tasks/setup-local.yml
@@ -9,6 +9,20 @@
---
+- name: checking status of ssh_auth_sock
+ shell: echo $SSH_AUTH_SOCK
+ register: sock_status
+ ignore_errors: yes
+
+- name: checking status of ssh_agent_pid
+ shell: pidof ssh-agent
+ register: pid_status
+ ignore_errors: yes
+
+- fail:
+ msg: "ssh-agent is required to execute QTIP. Use 'eval $(ssh-agent)' to start it"
+ when: sock_status.stdout == '' or pid_status.stdout == ''
+
- name: formatting directory name for current run
set_fact:
pod_results: "{{ pod_name }}-{{ lookup('pipe', 'date +%Y%m%d-%H%M') }}"