Re: [ansible-project] Variable to be selected from the options

2023-07-26 Thread Veera
Thanks Walter On Wednesday, July 26, 2023 at 6:31:15 PM UTC+5:30 Rowe, Walter P. (Fed) wrote: > Using ansible's order of precedence you can set the default value in the > playbook and override it with extra_vars. > > > *override.yaml:* > > > --- > > - name: test overriding playbook variable >

Re: [ansible-project] Variable to be selected from the options

2023-07-26 Thread 'Rowe, Walter P. (Fed)' via Ansible Project
Using ansible's order of precedence you can set the default value in the playbook and override it with extra_vars. override.yaml: --- - name: test overriding playbook variable hosts: all become: false gather_facts: false vars: rebootSetting: "ifRequired" tasks: -

[ansible-project] Variable to be selected from the options

2023-07-26 Thread Veera
Hi, I have the below variable defined in my playbook. reboot_option: - IfRequired - Never - Always while calling the same variable from the playbook , the value "IfRequired' must be the default. "rebootSetting": "{{ reboot_option | default(Ifrequired) }}" While executing the playbook