questions

This commit is contained in:
Navas 2024-10-19 17:20:13 +02:00
parent e79dc55b96
commit 56b833f044

View file

@ -8,7 +8,7 @@ def runAnsiblePlaybook(config, key):
if 'questions' in config['ansible_playbooks'][key]: if 'questions' in config['ansible_playbooks'][key]:
for question in config['ansible_playbooks'][key]['questions']: for question in config['ansible_playbooks'][key]['questions']:
var_name = question.pop('var_name') var_name = question.pop('var_name')
extra_vars[var_name] = prompt(question) extra_vars[var_name] = prompt(question)[0]
if 'extra_vars' in config['ansible_playbooks'][key]: if 'extra_vars' in config['ansible_playbooks'][key]:
extra_vars = extra_vars | config['ansible_playbooks'][key]['extra_vars'] extra_vars = extra_vars | config['ansible_playbooks'][key]['extra_vars']