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
>
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:
-
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