From 3ea3550d8c7979b58ea2c7b50b338bff84db7366 Mon Sep 17 00:00:00 2001 From: Lance Bragstad Date: Mon, 20 Jul 2020 10:24:44 -0500 Subject: [PATCH] WIP: Namespace host_otp variable By namespacing the variable with the project name, we clarify what exactly we're providing if people want to invoke the ipa-server-register-undercloud.yaml tasks from another ansible playbook and fish the OTP out using a variable name. Change-Id: If053250937ce76705cdd5084d76869edca8404ce --- tripleo_ipa/playbooks/README.md | 4 ++++ tripleo_ipa/playbooks/ipa-server-register-undercloud.yaml | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/tripleo_ipa/playbooks/README.md b/tripleo_ipa/playbooks/README.md index 32050c0..d1f46c8 100644 --- a/tripleo_ipa/playbooks/README.md +++ b/tripleo_ipa/playbooks/README.md @@ -21,6 +21,10 @@ ok: [localhost] => { ] } ``` + +If you're including this playbook via another ansible execution, you can fetch +the one-time password via the ``tripleo_ipa_host_otp`` variable. + > This playbook does not require an active Kerberos token. > This playbook needs to be run once per openstack deployment. diff --git a/tripleo_ipa/playbooks/ipa-server-register-undercloud.yaml b/tripleo_ipa/playbooks/ipa-server-register-undercloud.yaml index e5d76e4..9a29ed8 100644 --- a/tripleo_ipa/playbooks/ipa-server-register-undercloud.yaml +++ b/tripleo_ipa/playbooks/ipa-server-register-undercloud.yaml @@ -57,11 +57,11 @@ fqdn: "{{ undercloud_fqdn }}" random_password: true force: true - register: host_otp + register: tripleo_ipa_host_otp - name: provide OTP generated by IPA server debug: msg: - - "The OTP provided by the IPA server is {{ host_otp.host.randompassword }}" + - "The OTP provided by the IPA server is {{ tripleo_ipa_host_otp.host.randompassword }}" - "Please add the following to your undercloud.conf:" - - "ipa_otp = {{ host_otp.host.randompassword }}" + - "ipa_otp = {{ tripleo_ipa_host_otp.host.randompassword }}"