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 <[email protected]> wrote: >> >> yes, you need to gather facts before that variable is available, you might >> want to use |default filter to avoid the error > ansible_become_method: "{{ > (ansible_distribution_release|version_compare('5.8', > '>='))|ternary('doas', 'sudo') }}" I think Brian meant something like this: ansible_become_method: "{{ (ansible_distribution_release|version_compare('5.8', > '>='))|ternary('doas', 'sudo')|default(sudo) }}" This way, when ansible_distribution_release is undefined, the default(sudo) strikes and sets a default. Once ansible_distribution_release is defined, default does nothing anymore. Johannes -- 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/56DDC5D6.5050208%40ojkastl.de. For more options, visit https://groups.google.com/d/optout.
signature.asc
Description: OpenPGP digital signature
