Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

External automation tool #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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 }}"