Hi Darren,
Am 07.03.16 schrieb Darren S.:
> I'm still finding myself stumped on this.
See my answer below.
> On Mon, Feb 29, 2016 at 10:29 PM, Brian Coca wrote:
>>
>> yes, you need to gather facts before that variable is available, you might
>> want to use |default filter
I'm still finding myself stumped on this.
On Mon, Feb 29, 2016 at 10:29 PM, Brian Coca 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
yes, you need to gather facts before that variable is available, you might
want to use |default filter to avoid the error
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop
On Fri, Feb 26, 2016 at 11:10 PM, Brian Coca wrote:
> Y
> ou cannot use jinja2 commands in vars file, the templates are not used in
> the vars file, they are just assigned as strings that later get recognized
> as templates and templated. But you can do this:
>
>
We do stuff with inventory variales and dicts, like
become_method:
5.7: doas
5.8: doas
6.0: sudo
ansible_become_method: become_method[ansible_distribution_release]
You can't do the >= thing this way, you have to enumerate all the options.
(Or you could have a default and only
Y
ou cannot use jinja2 commands in vars file, the templates are not used in
the vars file, they are just assigned as strings that later get recognized
as templates and templated. But you can do this:
ansible_become_method: "{{
(ansible_distribution_release|version_compare('5.8',
Hi,
After various docs and some trial and error, I can't figure out how to
handle setting a variable differently when the target operating system
version is newer than a certain release. OpenBSD 5.8 and newer have
replaced sudo(8) with doas(1), so I'd like to set ansible_become_method
correctly