issue #297: local commands must execute with WorkerProcess environment.
parent
012745efea
commit
d8e0c9e12c
@ -1,4 +1,4 @@
|
|||||||
|
|
||||||
- import_playbook: cwd_preserved.yml
|
- import_playbook: cwd_preserved.yml
|
||||||
#- import_playbook: env_preserved.yml
|
- import_playbook: env_preserved.yml
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,8 @@
|
|||||||
|
|
||||||
|
# Execution environment should be that of WorkerProcess --
|
||||||
|
# https://github.com/dw/mitogen/issues/297
|
||||||
|
|
||||||
|
- hosts: localhost
|
||||||
|
connection: local
|
||||||
|
tasks:
|
||||||
|
- shell: "env | grep EVIL_VARS_PLUGIN"
|
||||||
@ -0,0 +1,16 @@
|
|||||||
|
# https://github.com/dw/mitogen/issues/297
|
||||||
|
|
||||||
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
|
from ansible.plugins.vars import BaseVarsPlugin
|
||||||
|
import os
|
||||||
|
|
||||||
|
class VarsModule(BaseVarsPlugin):
|
||||||
|
def __init__(self, *args):
|
||||||
|
super(VarsModule, self).__init__(*args)
|
||||||
|
os.environ['EVIL_VARS_PLUGIN'] = 'YIPEEE'
|
||||||
|
|
||||||
|
def get_vars(self, loader, path, entities, cache=True):
|
||||||
|
super(VarsModule, self).get_vars(loader, path, entities)
|
||||||
|
return {}
|
||||||
Loading…
Reference in New Issue