Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions inventory_display.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Use this playbook as a tool with other automation to gather the Cluster
# node names and the number of nodes in the cluster.
# This is usefull for other automation that is waiting for the cluster
# provisioning to complete.
#
# Here's output using the sample inventoy
# "HOSTNAMES": {
# "app1": "app1.mycluster.example.com",
# "bootstrap": "bootstrap.mycluster.example.com",
# "infra1": "infra1.mycluster.example.com",
# "master1": "master1.mycluster.example.com"
# }
# },
# {
# "HOSTNAME COUNT": "4"

#
- hosts: helper
tasks:
- import_role:
name: openshift_common
tasks_from: compute_vm_names.yml

- name: Display node names
debug:
msg:
- HOSTNAMES: "{{ virtual_machine_names }}"
- HOSTNAME COUNT: "{{ virtual_machine_names | length }}"