From 1d9bf6fd0964d507256a875f84dceaacba230c1c Mon Sep 17 00:00:00 2001 From: Olivier Date: Sat, 19 Oct 2024 17:18:08 +0200 Subject: [PATCH] questions --- linuxinstaller/AnsibleActions.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linuxinstaller/AnsibleActions.py b/linuxinstaller/AnsibleActions.py index 9b0b8a0..044059a 100644 --- a/linuxinstaller/AnsibleActions.py +++ b/linuxinstaller/AnsibleActions.py @@ -7,7 +7,8 @@ def runAnsiblePlaybook(config, key): extra_vars={} if 'questions' in config['ansible_playbooks'][key]: for question in config['ansible_playbooks'][key]['questions']: - extra_vars[question['var_name']] = prompt(question) + var_name = question.pop('var_name') + extra_vars[var_name] = prompt(question) if 'extra_vars' in config['ansible_playbooks'][key]: extra_vars = extra_vars | config['ansible_playbooks'][key]['extra_vars']