-
Notifications
You must be signed in to change notification settings - Fork 445
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CE-171] Add playbook to show network state
Change-Id: If15ec781ad262b4f40a73c22af17b572f019d637 Signed-off-by: tongliofcary <[email protected]>
- Loading branch information
tongliofcary
committed
Nov 13, 2017
1 parent
9b156d6
commit 71fe841
Showing
2 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |