Skip to content

Commit

Permalink
[CE-171] Add playbook to show network state
Browse files Browse the repository at this point in the history
Change-Id: If15ec781ad262b4f40a73c22af17b572f019d637
Signed-off-by: tongliofcary <litong01@us.ibm.com>
  • Loading branch information
tongliofcary committed Nov 13, 2017
1 parent 9b156d6 commit 71fe841
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/agent/ansible/roles/verify/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---

- name: verify fabric network
hosts: allnodes
user: "{{ cluster.ssh_user }}"
vars_files:
- "./../../vars/{{ env }}.yml"
tasks:
- name: Wait for containers to be ready
pause:
seconds: 10

- name: Display docker logs
command: docker ps -a
register: dockercontainers

- debug:
var: dockercontainers.stdout_lines
19 changes: 19 additions & 0 deletions src/agent/ansible/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
- name: Get start timestamp
hosts: cloud
connection: local
tasks:
- set_fact:
starttime: "{{ ansible_date_time }}"

- name: Run the plays
include: "roles/verify/main.yml"

- name: inform the installer
hosts: cloud
connection: local
tasks:
- debug:
msg: >-
The work load started at {{ hostvars.cloud.starttime.time }},
ended at {{ ansible_date_time.time }}

0 comments on commit 71fe841

Please sign in to comment.