I know I can define the variable previous to this, but I am wondering if I 
can combine setting a variable with a default value within set_fact.  If 
possible, I wonder if my syntax is wrong (likely)?  I can't seem to find 
much documentation on this.  If you have a link to this answer in the docs, 
I would like to review it, but apparently I am not using the right keywords 
in my search.

Basically, I wish to have the handler_name set to Networking unless my 
major version is 8.  If that is the case then I want it set to: Network 
Manager

- set_fact:
    handler_name: "{{ 'Network Manager' | default('Networking') }} "
  when: ansible_distribution_major_version == 8


-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/ba2c4875-89b3-431b-a709-ba3ef6489692%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to