summaryrefslogtreecommitdiffstats
path: root/playbooks/libvirt/openshift-cluster/list.yml
diff options
context:
space:
mode:
authorLénaïc Huard <lhuard@amadeus.com>2015-08-13 14:45:25 +0200
committerLénaïc Huard <lhuard@amadeus.com>2015-11-13 15:45:35 +0100
commit332aa8c8219ba99510090ce2412326780ad9ce74 (patch)
tree46338502de5ce2bf7f3c7e9b8b1e3c80011a7011 /playbooks/libvirt/openshift-cluster/list.yml
parent0bcea6eaf24b796ba6b2658c213c8bc24783d498 (diff)
downloadopenshift-332aa8c8219ba99510090ce2412326780ad9ce74.tar.gz
openshift-332aa8c8219ba99510090ce2412326780ad9ce74.tar.bz2
openshift-332aa8c8219ba99510090ce2412326780ad9ce74.tar.xz
openshift-332aa8c8219ba99510090ce2412326780ad9ce74.zip
Better structure the output of the list playbook
The list playbook listed the IPs of the VMs without logging their role like: TASK: [debug ] ************************************************************ ok: [10.64.109.37] => { "msg": "public:10.64.109.37 private:192.168.165.5" } ok: [10.64.109.47] => { "msg": "public:10.64.109.47 private:192.168.165.6" } ok: [10.64.109.36] => { "msg": "public:10.64.109.36 private:192.168.165.4" } ok: [10.64.109.215] => { "msg": "public:10.64.109.215 private:192.168.165.2" } The list playbook now prints the information in a more structured way with a list of masters, a list of nodes and the subtype of the nodes like: TASK: [debug ] ************************************************************ ok: [localhost] => { "msg": { "lenaicnewlist": { "master": [ { "name": "10.64.109.215", "private IP": "192.168.165.2", "public IP": "10.64.109.215", "subtype": "default" } ], "node": [ { "name": "10.64.109.47", "private IP": "192.168.165.6", "public IP": "10.64.109.47", "subtype": "compute" }, { "name": "10.64.109.37", "private IP": "192.168.165.5", "public IP": "10.64.109.37", "subtype": "compute" }, { "name": "10.64.109.36", "private IP": "192.168.165.4", "public IP": "10.64.109.36", "subtype": "infra" } ] } } }
Diffstat (limited to 'playbooks/libvirt/openshift-cluster/list.yml')
-rw-r--r--playbooks/libvirt/openshift-cluster/list.yml8
1 files changed, 7 insertions, 1 deletions
diff --git a/playbooks/libvirt/openshift-cluster/list.yml b/playbooks/libvirt/openshift-cluster/list.yml
index eaedc4d0d..5954bb01e 100644
--- a/playbooks/libvirt/openshift-cluster/list.yml
+++ b/playbooks/libvirt/openshift-cluster/list.yml
@@ -18,6 +18,12 @@
- name: List Hosts
hosts: oo_list_hosts
+
+- name: List Hosts
+ hosts: localhost
+ gather_facts: no
+ vars_files:
+ - vars.yml
tasks:
- debug:
- msg: 'public:{{ansible_default_ipv4.address}} private:{{ansible_default_ipv4.address}}'
+ msg: "{{ hostvars | oo_select_keys(groups[scratch_group] | default([])) | oo_pretty_print_cluster }}"