From 9c8a2d91f6ba2efc71ea9a298dc3af099c2990f9 Mon Sep 17 00:00:00 2001 From: David Demlow Date: Tue, 29 Sep 2026 11:48:55 -0400 Subject: [PATCH] examples: show how cluster_config gets its connection details examples/cluster_config.yml had no environment section, so a reader had no hint that the role takes no cluster_instance and relies on SC_HOST / SC_USERNAME / SC_PASSWORD. Add a commented play-level block and say why it belongs at play level (environment on include_role does not reach the role's tasks). examples/iso_info.yml wrote its commented SC_* entries as list items under a mapping; uncommented as written that is invalid YAML. Refs #380 Co-Authored-By: Claude Opus 5.5 --- examples/cluster_config.yml | 10 ++++++++++ examples/iso_info.yml | 6 +++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/examples/cluster_config.yml b/examples/cluster_config.yml index 5a1f8da72..be9489eef 100644 --- a/examples/cluster_config.yml +++ b/examples/cluster_config.yml @@ -3,6 +3,16 @@ hosts: localhost connection: local gather_facts: false + # The cluster_config role takes no connection parameters (no cluster_instance). + # Its modules read SC_HOST, SC_USERNAME and SC_PASSWORD from the environment. + # Either export them in your shell before running the playbook, or uncomment + # and set them here (keep the password in Ansible Vault). + # Set environment at play level: on an include_role task it would apply only + # to the include itself, not to the tasks inside the role. + # environment: + # SC_HOST: https://1.2.3.4 + # SC_USERNAME: admin + # SC_PASSWORD: "{{ vault_sc_password }}" # We do not want to reconfigure cluster with bogus example values. check_mode: true diff --git a/examples/iso_info.yml b/examples/iso_info.yml index fc5c2211a..7b124ac7b 100644 --- a/examples/iso_info.yml +++ b/examples/iso_info.yml @@ -5,9 +5,9 @@ gather_facts: false environment: MY_VAR: my_value - # - SC_HOST: https://1.2.3.4 - # - SC_USERNAME: admin - # - SC_PASSWORD: todo + # SC_HOST: https://1.2.3.4 + # SC_USERNAME: admin + # SC_PASSWORD: todo tasks: # ------------------------------------------------------