diff options
Diffstat (limited to 'playbooks/openstack/openshift-cluster/list.yml')
-rw-r--r-- | playbooks/openstack/openshift-cluster/list.yml | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/playbooks/openstack/openshift-cluster/list.yml b/playbooks/openstack/openshift-cluster/list.yml index a75e350c7..123ebd323 100644 --- a/playbooks/openstack/openshift-cluster/list.yml +++ b/playbooks/openstack/openshift-cluster/list.yml @@ -1,11 +1,13 @@ --- - name: Generate oo_list_hosts group hosts: localhost + become: no + connection: local gather_facts: no vars_files: - vars.yml tasks: - - set_fact: scratch_group=tag_env_{{ cluster_id }} + - set_fact: scratch_group=tag_clusterid_{{ cluster_id }} when: cluster_id != '' - set_fact: scratch_group=all when: cluster_id == '' @@ -19,6 +21,14 @@ - name: List Hosts hosts: oo_list_hosts + +- name: List Hosts + hosts: localhost + become: no + connection: local + gather_facts: no + vars_files: + - vars.yml tasks: - debug: - msg: 'public:{{ansible_ssh_host}} private:{{ansible_default_ipv4.address}}' + msg: "{{ hostvars | oo_select_keys(groups[scratch_group] | default([])) | oo_pretty_print_cluster }}" |