CI: Add is_macos_controller Ansible variable for become_unpriv_available

This eliminates the need for ansible_facts to be gathered before
become_unpriv_available can be referenced.
pull/1268/head
Alex Willmer 6 months ago
parent dcff603267
commit 491d438427

@ -12,12 +12,12 @@ become_unpriv_available: >-
{{-
(
not is_mitogen
and ansible_facts.distribution in ["MacOSX"]
and is_macos_controller
and ansible_version.full is version("2.11", ">=", strict=True)
)
or (
is_mitogen
and not ansible_facts.distribution in ["MacOSX"]
and not is_macos_controller
)
or (
is_mitogen

@ -2,6 +2,7 @@
# Wrap ansible-playbook, setting up some test of the test environment.
import json
import os
import platform
import sys
GIT_BASEDIR = os.path.dirname(
@ -36,6 +37,7 @@ os.environ['PATH'] = '%s%s%s' % (
)
extra = {
'is_macos_controller': platform.system() == 'Darwin',
'is_mitogen': os.environ.get('ANSIBLE_STRATEGY', '').startswith('mitogen'),
'git_basedir': GIT_BASEDIR,
}

Loading…
Cancel
Save