I'm still finding myself stumped on this.

On Mon, Feb 29, 2016 at 10:29 PM, Brian Coca <bc...@ansible.com> wrote:
>
> yes, you need to gather facts before that variable is available, you might 
> want to use |default filter to avoid the error

If the variable ansible_distribution_release is used in a vars file:


## group_vars/openbsd
---
# OpenBSD group variables

ansible_python_interpreter: /usr/local/bin/python
sudoers_supergroup: wheel
snmpd_service_name: snmpd
# OpenBSD 5.8 and newer use doas(1) in place of sudo(8)
ansible_become_method: "{{
(ansible_distribution_release|version_compare('5.8',
'>='))|ternary('doas', 'sudo') }}"


...and facts are not gathered to supply it by default, how should
(can?) facts be gathered at a point prior to ansible_become_method
requiring the variable? The only way I think I know from the docs is
to call the setup module, but it seems like a chicken-and-egg problem
to me.

Confident I don't understand something simple but important. :-|

-- 
Darren Spruell
phatbuck...@gmail.com

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAKVSOJUm3VU%3Dk%3DXSVU6iALzNiSctEba3iFkRQt8qr9gXf364ow%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to