mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
ansible_playbook_python (#18530)
* ansible_playbook_python fixes #18471 * fix tests * removed dupe
This commit is contained in:
@@ -694,7 +694,7 @@ class ActionBase(with_metaclass(ABCMeta, object)):
|
||||
pass
|
||||
|
||||
# remove some KNOWN keys
|
||||
for hard in ['ansible_rsync_path']:
|
||||
for hard in ['ansible_rsync_path', 'ansible_playbook_python']:
|
||||
if hard in fact_keys:
|
||||
remove_keys.add(hard)
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
from collections import defaultdict, MutableMapping
|
||||
|
||||
@@ -392,6 +393,7 @@ class VariableManager:
|
||||
|
||||
variables = dict()
|
||||
variables['playbook_dir'] = loader.get_basedir()
|
||||
variables['ansible_playbook_python'] = sys.executable
|
||||
|
||||
if host:
|
||||
variables['group_names'] = sorted([group.name for group in host.get_groups() if group.name != 'all'])
|
||||
|
||||
Reference in New Issue
Block a user