From 660715497bd3052774e7f4e2f3a346de9dc72c9f Mon Sep 17 00:00:00 2001 From: Chris Hammer Date: Fri, 20 Dec 2024 17:42:15 -0500 Subject: [PATCH] 7 --- survey.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/survey.yml b/survey.yml index 0143e66..c0ee32e 100644 --- a/survey.yml +++ b/survey.yml @@ -13,6 +13,9 @@ ansible.builtin.debug: var: aap_survey_textarea + # Need to be careful here. While password fields + # are masked in AAP, during execution they can + # be displayed through examples like this: - name: Example of 'password' ansible.builtin.debug: var: aap_survey_password @@ -21,17 +24,29 @@ ansible.builtin.debug: var: aap_survey_choose_single + # Multiplechoice survey's come across as a list... - name: Example of 'Multiple Choice (multiple select)' ansible.builtin.debug: var: aap_survey_choose_multiple - - name: Loop through selections and act if its the 'World' + # Here we loop through the choices, and if its 'World' + # we display a message: + - name: Loop through selections and act if its 'World' ansible.builtin.debug: msg: "Hello {{ item }}" loop: "{{ aap_survey_choose_multiple }}" when: - "'World' in item" + # Here we loop through the choices, and if its 'Two' + # we display a message: + - name: Loop through selections and act if its 'Two' + ansible.builtin.debug: + msg: "One... {{ item }}... Three..." + loop: "{{ aap_survey_choose_multiple }}" + when: + - "'Two' in item" + - name: Example of 'Integer' ansible.builtin.debug: var: aap_survey_integer