aboutsummaryrefslogtreecommitdiffstats
path: root/resources
diff options
context:
space:
mode:
authorTaseer <taseer94@gmail.com>2017-05-12 16:10:05 +0500
committerTaseer <taseer94@gmail.com>2017-05-15 12:05:22 +0500
commit1eea41c057f24f97248a860a8fc25b3fa9847209 (patch)
tree97f904d3d23781c932b392bf4f200e917321f6a3 /resources
parentd8e9b38874db8ccf5d4d9f08c387f2112ed8cfae (diff)
Check ssh-agent before running tests. Fail playbook if not running.
- Need to start it manually. Not possible via playbook. JIRA: QTIP-242 Change-Id: Ief593fe54a900f7aa36890be5317a60bcb65a82e Signed-off-by: Taseer Ahmed <taseer94@gmail.com>
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') }}"