initial project commit
This commit is contained in:
@ -0,0 +1,34 @@
|
||||
# (c) 2014, Toshio Kuratomi <tkuratomi@ansible.com>
|
||||
#
|
||||
# This file is part of Ansible
|
||||
#
|
||||
# Ansible is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# Ansible is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Make coding more python3-ish
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
#
|
||||
# Compat for python2.7
|
||||
#
|
||||
|
||||
# One unittest needs to import builtins via __import__() so we need to have
|
||||
# the string that represents it
|
||||
try:
|
||||
import __builtin__
|
||||
except ImportError:
|
||||
BUILTINS = 'builtins'
|
||||
else:
|
||||
BUILTINS = '__builtin__'
|
||||
__all__ = ['__builtin__']
|
@ -0,0 +1,122 @@
|
||||
# (c) 2014, Toshio Kuratomi <tkuratomi@ansible.com>
|
||||
#
|
||||
# This file is part of Ansible
|
||||
#
|
||||
# Ansible is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# Ansible is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Make coding more python3-ish
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
'''
|
||||
Compat module for Python3.x's unittest.mock module
|
||||
'''
|
||||
import sys
|
||||
|
||||
# Python 2.7
|
||||
|
||||
# Note: Could use the pypi mock library on python3.x as well as python2.x. It
|
||||
# is the same as the python3 stdlib mock library
|
||||
|
||||
try:
|
||||
# Allow wildcard import because we really do want to import all of mock's
|
||||
# symbols into this compat shim
|
||||
# pylint: disable=wildcard-import,unused-wildcard-import
|
||||
from unittest.mock import *
|
||||
except ImportError:
|
||||
# Python 2
|
||||
# pylint: disable=wildcard-import,unused-wildcard-import
|
||||
try:
|
||||
from mock import *
|
||||
except ImportError:
|
||||
print('You need the mock library installed on python2.x to run tests')
|
||||
|
||||
|
||||
# Prior to 3.4.4, mock_open cannot handle binary read_data
|
||||
if sys.version_info >= (3,) and sys.version_info < (3, 4, 4):
|
||||
file_spec = None
|
||||
|
||||
def _iterate_read_data(read_data):
|
||||
# Helper for mock_open:
|
||||
# Retrieve lines from read_data via a generator so that separate calls to
|
||||
# readline, read, and readlines are properly interleaved
|
||||
sep = b'\n' if isinstance(read_data, bytes) else '\n'
|
||||
data_as_list = [l + sep for l in read_data.split(sep)]
|
||||
|
||||
if data_as_list[-1] == sep:
|
||||
# If the last line ended in a newline, the list comprehension will have an
|
||||
# extra entry that's just a newline. Remove this.
|
||||
data_as_list = data_as_list[:-1]
|
||||
else:
|
||||
# If there wasn't an extra newline by itself, then the file being
|
||||
# emulated doesn't have a newline to end the last line remove the
|
||||
# newline that our naive format() added
|
||||
data_as_list[-1] = data_as_list[-1][:-1]
|
||||
|
||||
for line in data_as_list:
|
||||
yield line
|
||||
|
||||
def mock_open(mock=None, read_data=''):
|
||||
"""
|
||||
A helper function to create a mock to replace the use of `open`. It works
|
||||
for `open` called directly or used as a context manager.
|
||||
|
||||
The `mock` argument is the mock object to configure. If `None` (the
|
||||
default) then a `MagicMock` will be created for you, with the API limited
|
||||
to methods or attributes available on standard file handles.
|
||||
|
||||
`read_data` is a string for the `read` methoddline`, and `readlines` of the
|
||||
file handle to return. This is an empty string by default.
|
||||
"""
|
||||
def _readlines_side_effect(*args, **kwargs):
|
||||
if handle.readlines.return_value is not None:
|
||||
return handle.readlines.return_value
|
||||
return list(_data)
|
||||
|
||||
def _read_side_effect(*args, **kwargs):
|
||||
if handle.read.return_value is not None:
|
||||
return handle.read.return_value
|
||||
return type(read_data)().join(_data)
|
||||
|
||||
def _readline_side_effect():
|
||||
if handle.readline.return_value is not None:
|
||||
while True:
|
||||
yield handle.readline.return_value
|
||||
for line in _data:
|
||||
yield line
|
||||
|
||||
global file_spec
|
||||
if file_spec is None:
|
||||
import _io
|
||||
file_spec = list(set(dir(_io.TextIOWrapper)).union(set(dir(_io.BytesIO))))
|
||||
|
||||
if mock is None:
|
||||
mock = MagicMock(name='open', spec=open)
|
||||
|
||||
handle = MagicMock(spec=file_spec)
|
||||
handle.__enter__.return_value = handle
|
||||
|
||||
_data = _iterate_read_data(read_data)
|
||||
|
||||
handle.write.return_value = None
|
||||
handle.read.return_value = None
|
||||
handle.readline.return_value = None
|
||||
handle.readlines.return_value = None
|
||||
|
||||
handle.read.side_effect = _read_side_effect
|
||||
handle.readline.side_effect = _readline_side_effect()
|
||||
handle.readlines.side_effect = _readlines_side_effect
|
||||
|
||||
mock.return_value = handle
|
||||
return mock
|
@ -0,0 +1,38 @@
|
||||
# (c) 2014, Toshio Kuratomi <tkuratomi@ansible.com>
|
||||
#
|
||||
# This file is part of Ansible
|
||||
#
|
||||
# Ansible is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# Ansible is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Make coding more python3-ish
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
'''
|
||||
Compat module for Python2.7's unittest module
|
||||
'''
|
||||
|
||||
import sys
|
||||
|
||||
# Allow wildcard import because we really do want to import all of
|
||||
# unittests's symbols into this compat shim
|
||||
# pylint: disable=wildcard-import,unused-wildcard-import
|
||||
if sys.version_info < (2, 7):
|
||||
try:
|
||||
# Need unittest2 on python2.6
|
||||
from unittest2 import *
|
||||
except ImportError:
|
||||
print('You need unittest2 installed on python2.6.x to run tests')
|
||||
else:
|
||||
from unittest import *
|
@ -0,0 +1,116 @@
|
||||
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
|
||||
#
|
||||
# This file is part of Ansible
|
||||
#
|
||||
# Ansible is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# Ansible is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Make coding more python3-ish
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
|
||||
from ansible.errors import AnsibleParserError
|
||||
from ansible.parsing.dataloader import DataLoader
|
||||
from ansible.module_utils._text import to_bytes, to_text
|
||||
|
||||
|
||||
class DictDataLoader(DataLoader):
|
||||
|
||||
def __init__(self, file_mapping=None):
|
||||
file_mapping = {} if file_mapping is None else file_mapping
|
||||
assert type(file_mapping) == dict
|
||||
|
||||
super(DictDataLoader, self).__init__()
|
||||
|
||||
self._file_mapping = file_mapping
|
||||
self._build_known_directories()
|
||||
self._vault_secrets = None
|
||||
|
||||
def load_from_file(self, path, cache=True, unsafe=False):
|
||||
path = to_text(path)
|
||||
if path in self._file_mapping:
|
||||
return self.load(self._file_mapping[path], path)
|
||||
return None
|
||||
|
||||
# TODO: the real _get_file_contents returns a bytestring, so we actually convert the
|
||||
# unicode/text it's created with to utf-8
|
||||
def _get_file_contents(self, file_name):
|
||||
path = to_text(file_name)
|
||||
if path in self._file_mapping:
|
||||
return (to_bytes(self._file_mapping[path]), False)
|
||||
else:
|
||||
raise AnsibleParserError("file not found: %s" % path)
|
||||
|
||||
def path_exists(self, path):
|
||||
path = to_text(path)
|
||||
return path in self._file_mapping or path in self._known_directories
|
||||
|
||||
def is_file(self, path):
|
||||
path = to_text(path)
|
||||
return path in self._file_mapping
|
||||
|
||||
def is_directory(self, path):
|
||||
path = to_text(path)
|
||||
return path in self._known_directories
|
||||
|
||||
def list_directory(self, path):
|
||||
ret = []
|
||||
path = to_text(path)
|
||||
for x in (list(self._file_mapping.keys()) + self._known_directories):
|
||||
if x.startswith(path):
|
||||
if os.path.dirname(x) == path:
|
||||
ret.append(os.path.basename(x))
|
||||
return ret
|
||||
|
||||
def is_executable(self, path):
|
||||
# FIXME: figure out a way to make paths return true for this
|
||||
return False
|
||||
|
||||
def _add_known_directory(self, directory):
|
||||
if directory not in self._known_directories:
|
||||
self._known_directories.append(directory)
|
||||
|
||||
def _build_known_directories(self):
|
||||
self._known_directories = []
|
||||
for path in self._file_mapping:
|
||||
dirname = os.path.dirname(path)
|
||||
while dirname not in ('/', ''):
|
||||
self._add_known_directory(dirname)
|
||||
dirname = os.path.dirname(dirname)
|
||||
|
||||
def push(self, path, content):
|
||||
rebuild_dirs = False
|
||||
if path not in self._file_mapping:
|
||||
rebuild_dirs = True
|
||||
|
||||
self._file_mapping[path] = content
|
||||
|
||||
if rebuild_dirs:
|
||||
self._build_known_directories()
|
||||
|
||||
def pop(self, path):
|
||||
if path in self._file_mapping:
|
||||
del self._file_mapping[path]
|
||||
self._build_known_directories()
|
||||
|
||||
def clear(self):
|
||||
self._file_mapping = dict()
|
||||
self._known_directories = []
|
||||
|
||||
def get_basedir(self):
|
||||
return os.getcwd()
|
||||
|
||||
def set_vault_secrets(self, vault_secrets):
|
||||
self._vault_secrets = vault_secrets
|
@ -0,0 +1,9 @@
|
||||
from __future__ import absolute_import, division, print_function
|
||||
|
||||
__metaclass__ = type
|
||||
|
||||
from ansible_collections.ansible.posix.tests.unit.compat.mock import MagicMock
|
||||
from ansible.utils.path import unfrackpath
|
||||
|
||||
|
||||
mock_unfrackpath_noop = MagicMock(spec_set=unfrackpath, side_effect=lambda x, *args, **kwargs: x)
|
@ -0,0 +1,90 @@
|
||||
# (c) 2016, Matt Davis <mdavis@ansible.com>
|
||||
# (c) 2016, Toshio Kuratomi <tkuratomi@ansible.com>
|
||||
#
|
||||
# This file is part of Ansible
|
||||
#
|
||||
# Ansible is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# Ansible is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Make coding more python3-ish
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
import sys
|
||||
import json
|
||||
|
||||
from contextlib import contextmanager
|
||||
from io import BytesIO, StringIO
|
||||
from ansible_collections.ansible.posix.tests.unit.compat import unittest
|
||||
from ansible.module_utils.six import PY3
|
||||
from ansible.module_utils._text import to_bytes
|
||||
|
||||
|
||||
@contextmanager
|
||||
def swap_stdin_and_argv(stdin_data='', argv_data=tuple()):
|
||||
"""
|
||||
context manager that temporarily masks the test runner's values for stdin and argv
|
||||
"""
|
||||
real_stdin = sys.stdin
|
||||
real_argv = sys.argv
|
||||
|
||||
if PY3:
|
||||
fake_stream = StringIO(stdin_data)
|
||||
fake_stream.buffer = BytesIO(to_bytes(stdin_data))
|
||||
else:
|
||||
fake_stream = BytesIO(to_bytes(stdin_data))
|
||||
|
||||
try:
|
||||
sys.stdin = fake_stream
|
||||
sys.argv = argv_data
|
||||
|
||||
yield
|
||||
finally:
|
||||
sys.stdin = real_stdin
|
||||
sys.argv = real_argv
|
||||
|
||||
|
||||
@contextmanager
|
||||
def swap_stdout():
|
||||
"""
|
||||
context manager that temporarily replaces stdout for tests that need to verify output
|
||||
"""
|
||||
old_stdout = sys.stdout
|
||||
|
||||
if PY3:
|
||||
fake_stream = StringIO()
|
||||
else:
|
||||
fake_stream = BytesIO()
|
||||
|
||||
try:
|
||||
sys.stdout = fake_stream
|
||||
|
||||
yield fake_stream
|
||||
finally:
|
||||
sys.stdout = old_stdout
|
||||
|
||||
|
||||
class ModuleTestCase(unittest.TestCase):
|
||||
def setUp(self, module_args=None):
|
||||
if module_args is None:
|
||||
module_args = {'_ansible_remote_tmp': '/tmp', '_ansible_keep_remote_files': False}
|
||||
|
||||
args = json.dumps(dict(ANSIBLE_MODULE_ARGS=module_args))
|
||||
|
||||
# unittest doesn't have a clean place to use a context manager, so we have to enter/exit manually
|
||||
self.stdin_swap = swap_stdin_and_argv(stdin_data=args)
|
||||
self.stdin_swap.__enter__()
|
||||
|
||||
def tearDown(self):
|
||||
# unittest doesn't have a clean place to use a context manager, so we have to enter/exit manually
|
||||
self.stdin_swap.__exit__(None, None, None)
|
@ -0,0 +1,39 @@
|
||||
# Ansible is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# Ansible is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Make coding more python3-ish
|
||||
from __future__ import (absolute_import, division, print_function)
|
||||
__metaclass__ = type
|
||||
|
||||
from ansible.module_utils._text import to_bytes
|
||||
|
||||
from ansible.parsing.vault import VaultSecret
|
||||
|
||||
|
||||
class TextVaultSecret(VaultSecret):
|
||||
'''A secret piece of text. ie, a password. Tracks text encoding.
|
||||
|
||||
The text encoding of the text may not be the default text encoding so
|
||||
we keep track of the encoding so we encode it to the same bytes.'''
|
||||
|
||||
def __init__(self, text, encoding=None, errors=None, _bytes=None):
|
||||
super(TextVaultSecret, self).__init__()
|
||||
self.text = text
|
||||
self.encoding = encoding or 'utf-8'
|
||||
self._bytes = _bytes
|
||||
self.errors = errors or 'strict'
|
||||
|
||||
@property
|
||||
def bytes(self):
|
||||
'''The text encoded with encoding, unless we specifically set _bytes.'''
|
||||
return self._bytes or to_bytes(self.text, encoding=self.encoding, errors=self.errors)
|
@ -0,0 +1,125 @@
|
||||
from __future__ import absolute_import, division, print_function
|
||||
|
||||
__metaclass__ = type
|
||||
|
||||
import io
|
||||
import yaml
|
||||
|
||||
from ansible.module_utils.six import PY3
|
||||
from ansible.parsing.yaml.loader import AnsibleLoader
|
||||
from ansible.parsing.yaml.dumper import AnsibleDumper
|
||||
|
||||
|
||||
class YamlTestUtils(object):
|
||||
"""Mixin class to combine with a unittest.TestCase subclass."""
|
||||
def _loader(self, stream):
|
||||
"""Vault related tests will want to override this.
|
||||
|
||||
Vault cases should setup a AnsibleLoader that has the vault password."""
|
||||
return AnsibleLoader(stream)
|
||||
|
||||
def _dump_stream(self, obj, stream, dumper=None):
|
||||
"""Dump to a py2-unicode or py3-string stream."""
|
||||
if PY3:
|
||||
return yaml.dump(obj, stream, Dumper=dumper)
|
||||
else:
|
||||
return yaml.dump(obj, stream, Dumper=dumper, encoding=None)
|
||||
|
||||
def _dump_string(self, obj, dumper=None):
|
||||
"""Dump to a py2-unicode or py3-string"""
|
||||
if PY3:
|
||||
return yaml.dump(obj, Dumper=dumper)
|
||||
else:
|
||||
return yaml.dump(obj, Dumper=dumper, encoding=None)
|
||||
|
||||
def _dump_load_cycle(self, obj):
|
||||
# Each pass though a dump or load revs the 'generation'
|
||||
# obj to yaml string
|
||||
string_from_object_dump = self._dump_string(obj, dumper=AnsibleDumper)
|
||||
|
||||
# wrap a stream/file like StringIO around that yaml
|
||||
stream_from_object_dump = io.StringIO(string_from_object_dump)
|
||||
loader = self._loader(stream_from_object_dump)
|
||||
# load the yaml stream to create a new instance of the object (gen 2)
|
||||
obj_2 = loader.get_data()
|
||||
|
||||
# dump the gen 2 objects directory to strings
|
||||
string_from_object_dump_2 = self._dump_string(obj_2,
|
||||
dumper=AnsibleDumper)
|
||||
|
||||
# The gen 1 and gen 2 yaml strings
|
||||
self.assertEqual(string_from_object_dump, string_from_object_dump_2)
|
||||
# the gen 1 (orig) and gen 2 py object
|
||||
self.assertEqual(obj, obj_2)
|
||||
|
||||
# again! gen 3... load strings into py objects
|
||||
stream_3 = io.StringIO(string_from_object_dump_2)
|
||||
loader_3 = self._loader(stream_3)
|
||||
obj_3 = loader_3.get_data()
|
||||
|
||||
string_from_object_dump_3 = self._dump_string(obj_3, dumper=AnsibleDumper)
|
||||
|
||||
self.assertEqual(obj, obj_3)
|
||||
# should be transitive, but...
|
||||
self.assertEqual(obj_2, obj_3)
|
||||
self.assertEqual(string_from_object_dump, string_from_object_dump_3)
|
||||
|
||||
def _old_dump_load_cycle(self, obj):
|
||||
'''Dump the passed in object to yaml, load it back up, dump again, compare.'''
|
||||
stream = io.StringIO()
|
||||
|
||||
yaml_string = self._dump_string(obj, dumper=AnsibleDumper)
|
||||
self._dump_stream(obj, stream, dumper=AnsibleDumper)
|
||||
|
||||
yaml_string_from_stream = stream.getvalue()
|
||||
|
||||
# reset stream
|
||||
stream.seek(0)
|
||||
|
||||
loader = self._loader(stream)
|
||||
# loader = AnsibleLoader(stream, vault_password=self.vault_password)
|
||||
obj_from_stream = loader.get_data()
|
||||
|
||||
stream_from_string = io.StringIO(yaml_string)
|
||||
loader2 = self._loader(stream_from_string)
|
||||
# loader2 = AnsibleLoader(stream_from_string, vault_password=self.vault_password)
|
||||
obj_from_string = loader2.get_data()
|
||||
|
||||
stream_obj_from_stream = io.StringIO()
|
||||
stream_obj_from_string = io.StringIO()
|
||||
|
||||
if PY3:
|
||||
yaml.dump(obj_from_stream, stream_obj_from_stream, Dumper=AnsibleDumper)
|
||||
yaml.dump(obj_from_stream, stream_obj_from_string, Dumper=AnsibleDumper)
|
||||
else:
|
||||
yaml.dump(obj_from_stream, stream_obj_from_stream, Dumper=AnsibleDumper, encoding=None)
|
||||
yaml.dump(obj_from_stream, stream_obj_from_string, Dumper=AnsibleDumper, encoding=None)
|
||||
|
||||
yaml_string_stream_obj_from_stream = stream_obj_from_stream.getvalue()
|
||||
yaml_string_stream_obj_from_string = stream_obj_from_string.getvalue()
|
||||
|
||||
stream_obj_from_stream.seek(0)
|
||||
stream_obj_from_string.seek(0)
|
||||
|
||||
if PY3:
|
||||
yaml_string_obj_from_stream = yaml.dump(obj_from_stream, Dumper=AnsibleDumper)
|
||||
yaml_string_obj_from_string = yaml.dump(obj_from_string, Dumper=AnsibleDumper)
|
||||
else:
|
||||
yaml_string_obj_from_stream = yaml.dump(obj_from_stream, Dumper=AnsibleDumper, encoding=None)
|
||||
yaml_string_obj_from_string = yaml.dump(obj_from_string, Dumper=AnsibleDumper, encoding=None)
|
||||
|
||||
assert yaml_string == yaml_string_obj_from_stream
|
||||
assert yaml_string == yaml_string_obj_from_stream == yaml_string_obj_from_string
|
||||
assert (yaml_string == yaml_string_obj_from_stream == yaml_string_obj_from_string == yaml_string_stream_obj_from_stream ==
|
||||
yaml_string_stream_obj_from_string)
|
||||
assert obj == obj_from_stream
|
||||
assert obj == obj_from_string
|
||||
assert obj == yaml_string_obj_from_stream
|
||||
assert obj == yaml_string_obj_from_string
|
||||
assert obj == obj_from_stream == obj_from_string == yaml_string_obj_from_stream == yaml_string_obj_from_string
|
||||
return {'obj': obj,
|
||||
'yaml_string': yaml_string,
|
||||
'yaml_string_from_stream': yaml_string_from_stream,
|
||||
'obj_from_stream': obj_from_stream,
|
||||
'obj_from_string': obj_from_string,
|
||||
'yaml_string_obj_from_string': yaml_string_obj_from_string}
|
@ -0,0 +1,32 @@
|
||||
# Copyright (c) 2017 Ansible Project
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
from __future__ import absolute_import, division, print_function
|
||||
|
||||
__metaclass__ = type
|
||||
|
||||
import json
|
||||
|
||||
import pytest
|
||||
|
||||
from ansible.module_utils.six import string_types
|
||||
from ansible.module_utils._text import to_bytes
|
||||
from ansible.module_utils.common._collections_compat import MutableMapping
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def patch_ansible_module(request, mocker):
|
||||
if isinstance(request.param, string_types):
|
||||
args = request.param
|
||||
elif isinstance(request.param, MutableMapping):
|
||||
if 'ANSIBLE_MODULE_ARGS' not in request.param:
|
||||
request.param = {'ANSIBLE_MODULE_ARGS': request.param}
|
||||
if '_ansible_remote_tmp' not in request.param['ANSIBLE_MODULE_ARGS']:
|
||||
request.param['ANSIBLE_MODULE_ARGS']['_ansible_remote_tmp'] = '/tmp'
|
||||
if '_ansible_keep_remote_files' not in request.param['ANSIBLE_MODULE_ARGS']:
|
||||
request.param['ANSIBLE_MODULE_ARGS']['_ansible_keep_remote_files'] = False
|
||||
args = json.dumps(request.param)
|
||||
else:
|
||||
raise Exception('Malformed data to the patch_ansible_module pytest fixture')
|
||||
|
||||
mocker.patch('ansible.module_utils.basic._ANSIBLE_ARGS', to_bytes(args))
|
@ -0,0 +1,63 @@
|
||||
from __future__ import absolute_import, division, print_function
|
||||
|
||||
__metaclass__ = type
|
||||
|
||||
import os
|
||||
import tempfile
|
||||
|
||||
from ansible_collections.ansible.posix.tests.unit.compat import unittest
|
||||
from ansible_collections.ansible.posix.tests.unit.compat.mock import MagicMock
|
||||
from ansible.module_utils._text import to_bytes
|
||||
|
||||
from ansible_collections.ansible.posix.plugins.modules.mount import (
|
||||
get_linux_mounts,
|
||||
_set_mount_save_old,
|
||||
set_mount,
|
||||
)
|
||||
|
||||
|
||||
class LinuxMountsTestCase(unittest.TestCase):
|
||||
|
||||
def _create_file(self, content):
|
||||
tmp_file = tempfile.NamedTemporaryFile(prefix='ansible-test-', delete=False)
|
||||
tmp_file.write(to_bytes(content))
|
||||
tmp_file.close()
|
||||
self.addCleanup(os.unlink, tmp_file.name)
|
||||
return tmp_file.name
|
||||
|
||||
def test_code_comment(self):
|
||||
path = self._create_file(
|
||||
'140 136 253:2 /rootfs / rw - ext4 /dev/sdb2 rw\n'
|
||||
'141 140 253:2 /rootfs/tmp/aaa /tmp/bbb rw - ext4 /dev/sdb2 rw\n'
|
||||
)
|
||||
mounts = get_linux_mounts(None, path)
|
||||
self.assertEqual(mounts['/tmp/bbb']['src'], '/tmp/aaa')
|
||||
|
||||
def test_set_mount_save_old(self):
|
||||
module = MagicMock(name='AnsibleModule')
|
||||
module.check_mode = True
|
||||
module.params = {'backup': False}
|
||||
|
||||
fstab_data = [
|
||||
'UUID=8ac075e3-1124-4bb6-bef7-a6811bf8b870 / xfs defaults 0 0\n',
|
||||
'/swapfile none swap defaults 0 0\n'
|
||||
]
|
||||
path = self._create_file("".join(fstab_data))
|
||||
args = {
|
||||
'fstab': path,
|
||||
'name': '/data',
|
||||
'src': '/dev/sdb1',
|
||||
'fstype': 'ext4',
|
||||
'opts': 'defaults',
|
||||
'dump': '0',
|
||||
'passno': '0',
|
||||
}
|
||||
|
||||
name, changed = set_mount(module, args)
|
||||
self.assertEqual(name, '/data')
|
||||
self.assertTrue(changed)
|
||||
|
||||
name, backup_lines, changed = _set_mount_save_old(module, args)
|
||||
self.assertEqual(backup_lines, fstab_data)
|
||||
self.assertEqual(name, '/data')
|
||||
self.assertTrue(changed)
|
@ -0,0 +1,51 @@
|
||||
from __future__ import absolute_import, division, print_function
|
||||
|
||||
__metaclass__ = type
|
||||
|
||||
import json
|
||||
|
||||
from ansible_collections.ansible.posix.tests.unit.compat import unittest
|
||||
from ansible_collections.ansible.posix.tests.unit.compat.mock import patch
|
||||
from ansible.module_utils import basic
|
||||
from ansible.module_utils._text import to_bytes
|
||||
|
||||
|
||||
def set_module_args(args):
|
||||
if '_ansible_remote_tmp' not in args:
|
||||
args['_ansible_remote_tmp'] = '/tmp'
|
||||
if '_ansible_keep_remote_files' not in args:
|
||||
args['_ansible_keep_remote_files'] = False
|
||||
|
||||
args = json.dumps({'ANSIBLE_MODULE_ARGS': args})
|
||||
basic._ANSIBLE_ARGS = to_bytes(args)
|
||||
|
||||
|
||||
class AnsibleExitJson(Exception):
|
||||
pass
|
||||
|
||||
|
||||
class AnsibleFailJson(Exception):
|
||||
pass
|
||||
|
||||
|
||||
def exit_json(*args, **kwargs):
|
||||
if 'changed' not in kwargs:
|
||||
kwargs['changed'] = False
|
||||
raise AnsibleExitJson(kwargs)
|
||||
|
||||
|
||||
def fail_json(*args, **kwargs):
|
||||
kwargs['failed'] = True
|
||||
raise AnsibleFailJson(kwargs)
|
||||
|
||||
|
||||
class ModuleTestCase(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
self.mock_module = patch.multiple(basic.AnsibleModule, exit_json=exit_json, fail_json=fail_json)
|
||||
self.mock_module.start()
|
||||
self.mock_sleep = patch('time.sleep')
|
||||
self.mock_sleep.start()
|
||||
set_module_args({})
|
||||
self.addCleanup(self.mock_module.stop)
|
||||
self.addCleanup(self.mock_sleep.stop)
|
@ -0,0 +1,17 @@
|
||||
fixtures:
|
||||
taskvars_in: taskvars_in.json
|
||||
taskvars_out: taskvars_out.json
|
||||
connection:
|
||||
transport: 'ssh'
|
||||
hostvars:
|
||||
'127.0.0.1': {}
|
||||
'::1': {}
|
||||
'localhost': {}
|
||||
asserts:
|
||||
- "hasattr(SAM._connection, 'ismock')"
|
||||
- "SAM._connection.transport == 'local'"
|
||||
- "self._play_context.shell == 'sh'"
|
||||
- "self.execute_called"
|
||||
- "self.final_module_args['_local_rsync_path'] == 'rsync'"
|
||||
- "self.final_module_args['src'] == '/tmp/deleteme'"
|
||||
- "self.final_module_args['dest'] == 'root@el6host:/tmp/deleteme'"
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
"dest": "root@el6host:/tmp/deleteme",
|
||||
"src": "/tmp/deleteme",
|
||||
"_local_rsync_path": "rsync"
|
||||
}
|
@ -0,0 +1,151 @@
|
||||
{
|
||||
"ansible_pipelining": false,
|
||||
"ansible_docker_extra_args": "",
|
||||
"ansible_scp_extra_args": "",
|
||||
"ansible_user": "root",
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_connection": "smart",
|
||||
"ansible_ssh_common_args": "",
|
||||
"environment": [],
|
||||
"inventory_hostname": "el6host",
|
||||
"vars": {
|
||||
"ansible_check_mode": false,
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_file": "inventory",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"role_names": [],
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"environment": [],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"hostvars": {
|
||||
"el6host": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host"
|
||||
],
|
||||
"all": [
|
||||
"el6host"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__03600813b83569c710bf5cb2a040d6e01da927c6",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host"
|
||||
],
|
||||
"all": [
|
||||
"el6host"
|
||||
]
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"omit": "__omit_place_holder__03600813b83569c710bf5cb2a040d6e01da927c6",
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_user": "root"
|
||||
},
|
||||
"ansible_accelerate_port": 5099,
|
||||
"roledir": null,
|
||||
"ansible_ssh_extra_args": "",
|
||||
"ansible_host": "el6host",
|
||||
"ansible_current_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"hostvars": {
|
||||
"el6host": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host"
|
||||
],
|
||||
"all": [
|
||||
"el6host"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__03600813b83569c710bf5cb2a040d6e01da927c6",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_ssh_pipelining": false,
|
||||
"inventory_file": "inventory",
|
||||
"ansible_module_compression": "ZIP_DEFLATED",
|
||||
"ansible_failed_hosts": [],
|
||||
"ansible_check_mode": false,
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host"
|
||||
],
|
||||
"all": [
|
||||
"el6host"
|
||||
]
|
||||
},
|
||||
"ansible_host": "el6host",
|
||||
"ansible_shell_executable": "/bin/sh",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"omit": "__omit_place_holder__03600813b83569c710bf5cb2a040d6e01da927c6",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"role_names": [],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_sftp_extra_args": ""
|
||||
}
|
@ -0,0 +1,156 @@
|
||||
{
|
||||
"ansible_pipelining": false,
|
||||
"ansible_docker_extra_args": "",
|
||||
"ansible_scp_extra_args": "",
|
||||
"ansible_user": "root",
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_connection": "smart",
|
||||
"ansible_ssh_common_args": "",
|
||||
"environment": [],
|
||||
"inventory_hostname": "el6host",
|
||||
"vars": {
|
||||
"ansible_check_mode": false,
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_file": "inventory",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"role_names": [],
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"environment": [],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"hostvars": {
|
||||
"el6host": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"::1"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"::1"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__03600813b83569c710bf5cb2a040d6e01da927c6",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host"
|
||||
],
|
||||
"all": [
|
||||
"el6host"
|
||||
]
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"omit": "__omit_place_holder__03600813b83569c710bf5cb2a040d6e01da927c6",
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_user": "root"
|
||||
},
|
||||
"ansible_accelerate_port": 5099,
|
||||
"roledir": null,
|
||||
"ansible_ssh_extra_args": "",
|
||||
"ansible_host": "el6host",
|
||||
"ansible_current_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"hostvars": {
|
||||
"el6host": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"::1"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"::1"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__03600813b83569c710bf5cb2a040d6e01da927c6",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_ssh_pipelining": false,
|
||||
"inventory_file": "inventory",
|
||||
"ansible_module_compression": "ZIP_DEFLATED",
|
||||
"ansible_failed_hosts": [],
|
||||
"ansible_check_mode": false,
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host"
|
||||
],
|
||||
"all": [
|
||||
"el6host"
|
||||
]
|
||||
},
|
||||
"ansible_host": "el6host",
|
||||
"ansible_shell_executable": "/bin/sh",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"omit": "__omit_place_holder__03600813b83569c710bf5cb2a040d6e01da927c6",
|
||||
"ansible_python_interpreter": "/usr/bin/python",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"role_names": [],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_sftp_extra_args": ""
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
task_args:
|
||||
src: /tmp/deleteme
|
||||
dest: /tmp/deleteme
|
||||
#rsync_path: rsync
|
||||
_task:
|
||||
become: True
|
||||
become_method: None
|
||||
fixtures:
|
||||
taskvars_in: task_vars_in.json
|
||||
taskvars_out: task_vars_out.json
|
||||
connection:
|
||||
transport: 'ssh'
|
||||
_play_context:
|
||||
become: True
|
||||
become_method: sudo
|
||||
remote_addr: el6host
|
||||
remote_user: root
|
||||
hostvars:
|
||||
'127.0.0.1': {}
|
||||
'::1': {}
|
||||
'localhost': {}
|
||||
asserts:
|
||||
- "hasattr(SAM._connection, 'ismock')"
|
||||
- "SAM._connection.transport == 'local'"
|
||||
- "self.execute_called"
|
||||
- "self.final_module_args['_local_rsync_path'] == 'rsync'"
|
||||
# this is a crucial aspect of this scenario ...
|
||||
# note: become_user None -> root
|
||||
- "self.final_module_args['rsync_path'] == 'sudo -u root rsync'"
|
||||
- "self.final_module_args['src'] == '/tmp/deleteme'"
|
||||
- "self.final_module_args['dest'] == 'root@el6host:/tmp/deleteme'"
|
||||
- "self.task.become == True"
|
||||
- "self.task.become_user == None"
|
||||
- "self._play_context.shell == 'sh'"
|
||||
- "self._play_context.remote_addr == 'el6host'"
|
||||
- "self._play_context.remote_user == 'root'"
|
||||
- "self._play_context.become == False"
|
||||
- "self._play_context.become_user == 'root'"
|
||||
- "self._play_context.password == None"
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"dest": "root@el6host:/tmp/deleteme",
|
||||
"src": "/tmp/deleteme",
|
||||
"rsync_path": "sudo rsync",
|
||||
"_local_rsync_path": "rsync"
|
||||
}
|
@ -0,0 +1,151 @@
|
||||
{
|
||||
"ansible_pipelining": false,
|
||||
"ansible_docker_extra_args": "",
|
||||
"ansible_scp_extra_args": "",
|
||||
"ansible_user": "root",
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_connection": "smart",
|
||||
"ansible_ssh_common_args": "",
|
||||
"environment": [],
|
||||
"inventory_hostname": "el6host",
|
||||
"vars": {
|
||||
"ansible_check_mode": false,
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_file": "inventory",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"role_names": [],
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"environment": [],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"hostvars": {
|
||||
"el6host": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host"
|
||||
],
|
||||
"all": [
|
||||
"el6host"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__b3ac1e6ebeed06f4be0c1edca3dca34036cf7f57",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host"
|
||||
],
|
||||
"all": [
|
||||
"el6host"
|
||||
]
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"omit": "__omit_place_holder__b3ac1e6ebeed06f4be0c1edca3dca34036cf7f57",
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_user": "root"
|
||||
},
|
||||
"ansible_accelerate_port": 5099,
|
||||
"roledir": null,
|
||||
"ansible_ssh_extra_args": "",
|
||||
"ansible_host": "el6host",
|
||||
"ansible_current_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"hostvars": {
|
||||
"el6host": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host"
|
||||
],
|
||||
"all": [
|
||||
"el6host"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__b3ac1e6ebeed06f4be0c1edca3dca34036cf7f57",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_ssh_pipelining": false,
|
||||
"inventory_file": "inventory",
|
||||
"ansible_module_compression": "ZIP_DEFLATED",
|
||||
"ansible_failed_hosts": [],
|
||||
"ansible_check_mode": false,
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host"
|
||||
],
|
||||
"all": [
|
||||
"el6host"
|
||||
]
|
||||
},
|
||||
"ansible_host": "el6host",
|
||||
"ansible_shell_executable": "/bin/sh",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"omit": "__omit_place_holder__b3ac1e6ebeed06f4be0c1edca3dca34036cf7f57",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"role_names": [],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_sftp_extra_args": ""
|
||||
}
|
@ -0,0 +1,156 @@
|
||||
{
|
||||
"ansible_pipelining": false,
|
||||
"ansible_docker_extra_args": "",
|
||||
"ansible_scp_extra_args": "",
|
||||
"ansible_user": "root",
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_connection": "smart",
|
||||
"ansible_ssh_common_args": "",
|
||||
"environment": [],
|
||||
"inventory_hostname": "el6host",
|
||||
"vars": {
|
||||
"ansible_check_mode": false,
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_file": "inventory",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"role_names": [],
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"environment": [],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"hostvars": {
|
||||
"el6host": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"::1"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"::1"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__b3ac1e6ebeed06f4be0c1edca3dca34036cf7f57",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host"
|
||||
],
|
||||
"all": [
|
||||
"el6host"
|
||||
]
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"omit": "__omit_place_holder__b3ac1e6ebeed06f4be0c1edca3dca34036cf7f57",
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_user": "root"
|
||||
},
|
||||
"ansible_accelerate_port": 5099,
|
||||
"roledir": null,
|
||||
"ansible_ssh_extra_args": "",
|
||||
"ansible_host": "el6host",
|
||||
"ansible_current_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"hostvars": {
|
||||
"el6host": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"::1"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"::1"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__b3ac1e6ebeed06f4be0c1edca3dca34036cf7f57",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_ssh_pipelining": false,
|
||||
"inventory_file": "inventory",
|
||||
"ansible_module_compression": "ZIP_DEFLATED",
|
||||
"ansible_failed_hosts": [],
|
||||
"ansible_check_mode": false,
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host"
|
||||
],
|
||||
"all": [
|
||||
"el6host"
|
||||
]
|
||||
},
|
||||
"ansible_host": "el6host",
|
||||
"ansible_shell_executable": "/bin/sh",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"omit": "__omit_place_holder__b3ac1e6ebeed06f4be0c1edca3dca34036cf7f57",
|
||||
"ansible_python_interpreter": "/usr/bin/python",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"role_names": [],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_sftp_extra_args": ""
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
task_args:
|
||||
src: /tmp/deleteme
|
||||
dest: /tmp/deleteme
|
||||
#rsync_path: rsync
|
||||
_task:
|
||||
become: None
|
||||
become_method: None
|
||||
fixtures:
|
||||
taskvars_in: task_vars_in.json
|
||||
taskvars_out: task_vars_out.json
|
||||
connection:
|
||||
transport: 'ssh'
|
||||
_play_context:
|
||||
become: True
|
||||
become_method: sudo
|
||||
remote_addr: el6host
|
||||
remote_user: root
|
||||
hostvars:
|
||||
'127.0.0.1': {}
|
||||
'::1': {}
|
||||
'localhost': {}
|
||||
asserts:
|
||||
- "hasattr(SAM._connection, 'ismock')"
|
||||
- "SAM._connection.transport == 'local'"
|
||||
- "self.execute_called"
|
||||
- "self.final_module_args['_local_rsync_path'] == 'rsync'"
|
||||
# this is a crucial aspect of this scenario ...
|
||||
# note: become_user None -> root
|
||||
- "self.final_module_args['rsync_path'] == 'sudo -u root rsync'"
|
||||
- "self.final_module_args['src'] == '/tmp/deleteme'"
|
||||
- "self.final_module_args['dest'] == 'root@el6host:/tmp/deleteme'"
|
||||
- "self.task.become == None"
|
||||
- "self.task.become_user == None"
|
||||
- "self._play_context.shell == 'sh'"
|
||||
- "self._play_context.remote_addr == 'el6host'"
|
||||
- "self._play_context.remote_user == 'root'"
|
||||
- "self._play_context.become == False"
|
||||
- "self._play_context.become_user == 'root'"
|
||||
- "self._play_context.password == None"
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"dest": "root@el6host:/tmp/deleteme",
|
||||
"src": "/tmp/deleteme",
|
||||
"rsync_path": "sudo rsync",
|
||||
"_local_rsync_path": "rsync"
|
||||
}
|
@ -0,0 +1,151 @@
|
||||
{
|
||||
"ansible_pipelining": false,
|
||||
"ansible_docker_extra_args": "",
|
||||
"ansible_scp_extra_args": "",
|
||||
"ansible_user": "root",
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_connection": "smart",
|
||||
"ansible_ssh_common_args": "",
|
||||
"environment": [],
|
||||
"inventory_hostname": "el6host",
|
||||
"vars": {
|
||||
"ansible_check_mode": false,
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_file": "inventory",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"role_names": [],
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"environment": [],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"hostvars": {
|
||||
"el6host": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host"
|
||||
],
|
||||
"all": [
|
||||
"el6host"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__b3ac1e6ebeed06f4be0c1edca3dca34036cf7f57",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host"
|
||||
],
|
||||
"all": [
|
||||
"el6host"
|
||||
]
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"omit": "__omit_place_holder__b3ac1e6ebeed06f4be0c1edca3dca34036cf7f57",
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_user": "root"
|
||||
},
|
||||
"ansible_accelerate_port": 5099,
|
||||
"roledir": null,
|
||||
"ansible_ssh_extra_args": "",
|
||||
"ansible_host": "el6host",
|
||||
"ansible_current_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"hostvars": {
|
||||
"el6host": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host"
|
||||
],
|
||||
"all": [
|
||||
"el6host"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__b3ac1e6ebeed06f4be0c1edca3dca34036cf7f57",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_ssh_pipelining": false,
|
||||
"inventory_file": "inventory",
|
||||
"ansible_module_compression": "ZIP_DEFLATED",
|
||||
"ansible_failed_hosts": [],
|
||||
"ansible_check_mode": false,
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host"
|
||||
],
|
||||
"all": [
|
||||
"el6host"
|
||||
]
|
||||
},
|
||||
"ansible_host": "el6host",
|
||||
"ansible_shell_executable": "/bin/sh",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"omit": "__omit_place_holder__b3ac1e6ebeed06f4be0c1edca3dca34036cf7f57",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"role_names": [],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_sftp_extra_args": ""
|
||||
}
|
@ -0,0 +1,156 @@
|
||||
{
|
||||
"ansible_pipelining": false,
|
||||
"ansible_docker_extra_args": "",
|
||||
"ansible_scp_extra_args": "",
|
||||
"ansible_user": "root",
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_connection": "smart",
|
||||
"ansible_ssh_common_args": "",
|
||||
"environment": [],
|
||||
"inventory_hostname": "el6host",
|
||||
"vars": {
|
||||
"ansible_check_mode": false,
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_file": "inventory",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"role_names": [],
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"environment": [],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"hostvars": {
|
||||
"el6host": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"::1"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"::1"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__b3ac1e6ebeed06f4be0c1edca3dca34036cf7f57",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host"
|
||||
],
|
||||
"all": [
|
||||
"el6host"
|
||||
]
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"omit": "__omit_place_holder__b3ac1e6ebeed06f4be0c1edca3dca34036cf7f57",
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_user": "root"
|
||||
},
|
||||
"ansible_accelerate_port": 5099,
|
||||
"roledir": null,
|
||||
"ansible_ssh_extra_args": "",
|
||||
"ansible_host": "el6host",
|
||||
"ansible_current_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"hostvars": {
|
||||
"el6host": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"::1"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"::1"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__b3ac1e6ebeed06f4be0c1edca3dca34036cf7f57",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_ssh_pipelining": false,
|
||||
"inventory_file": "inventory",
|
||||
"ansible_module_compression": "ZIP_DEFLATED",
|
||||
"ansible_failed_hosts": [],
|
||||
"ansible_check_mode": false,
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host"
|
||||
],
|
||||
"all": [
|
||||
"el6host"
|
||||
]
|
||||
},
|
||||
"ansible_host": "el6host",
|
||||
"ansible_shell_executable": "/bin/sh",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"omit": "__omit_place_holder__b3ac1e6ebeed06f4be0c1edca3dca34036cf7f57",
|
||||
"ansible_python_interpreter": "/usr/bin/python",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"role_names": [],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_sftp_extra_args": ""
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
task_args:
|
||||
src: /tmp/deleteme
|
||||
dest: /tmp/deleteme
|
||||
fixtures:
|
||||
taskvars_in: task_vars_in.json
|
||||
taskvars_out: task_vars_out.json
|
||||
connection:
|
||||
transport: 'ssh'
|
||||
_play_context:
|
||||
remote_addr: '127.0.0.1'
|
||||
remote_user: vagrant
|
||||
hostvars:
|
||||
'127.0.0.1': {}
|
||||
'::1': {}
|
||||
'localhost': {}
|
||||
asserts:
|
||||
- "hasattr(SAM._connection, 'ismock')"
|
||||
- "SAM._connection.transport == 'local'"
|
||||
- "self.execute_called"
|
||||
- "self.final_module_args['_local_rsync_path'] == 'rsync'"
|
||||
- "self.final_module_args['dest_port'] == 2202"
|
||||
- "self.final_module_args['src'] == '/tmp/deleteme'"
|
||||
- "self.final_module_args['dest'] == 'vagrant@127.0.0.1:/tmp/deleteme'"
|
||||
- "self._play_context.shell == 'sh'"
|
||||
- "self._play_context.remote_addr == '127.0.0.1'"
|
||||
- "self._play_context.remote_user == 'vagrant'"
|
||||
- "self._play_context.become == False"
|
||||
- "self._play_context.become_user == 'root'"
|
||||
- "self._play_context.password == None"
|
@ -0,0 +1,7 @@
|
||||
{
|
||||
"dest": "/tmp/deleteme",
|
||||
"src": "/tmp/deleteme",
|
||||
"private_key": "/home/jtanner/workspace/issues/AP-15905/.vagrant/machines/default/virtualbox/private_key",
|
||||
"dest_port": 2202,
|
||||
"_local_rsync_path": "rsync"
|
||||
}
|
@ -0,0 +1,164 @@
|
||||
{
|
||||
"ansible_pipelining": false,
|
||||
"ansible_docker_extra_args": "",
|
||||
"ansible_scp_extra_args": "",
|
||||
"ansible_user": "vagrant",
|
||||
"ansible_play_hosts": [
|
||||
"default"
|
||||
],
|
||||
"ansible_connection": "ssh",
|
||||
"ansible_ssh_common_args": "",
|
||||
"ansible_host": "127.0.0.1",
|
||||
"inventory_hostname": "default",
|
||||
"ansible_ssh_private_key_file": "/home/jtanner/workspace/issues/AP-15905/.vagrant/machines/default/virtualbox/private_key",
|
||||
"vars": {
|
||||
"ansible_check_mode": false,
|
||||
"environment": [],
|
||||
"inventory_hostname": "default",
|
||||
"inventory_file": null,
|
||||
"ansible_ssh_private_key_file": "/home/jtanner/workspace/issues/AP-15905/.vagrant/machines/default/virtualbox/private_key",
|
||||
"inventory_hostname_short": "default",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"role_names": [],
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905/.vagrant/provisioners/ansible/inventory",
|
||||
"ansible_host": "127.0.0.1",
|
||||
"play_hosts": [
|
||||
"default"
|
||||
],
|
||||
"ansible_play_hosts": [
|
||||
"default"
|
||||
],
|
||||
"hostvars": {
|
||||
"default": {
|
||||
"inventory_file": null,
|
||||
"ansible_check_mode": false,
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"default"
|
||||
],
|
||||
"all": [
|
||||
"default"
|
||||
]
|
||||
},
|
||||
"ansible_port": 2202,
|
||||
"inventory_hostname": "default",
|
||||
"ansible_ssh_private_key_file": "/home/jtanner/workspace/issues/AP-15905/.vagrant/machines/default/virtualbox/private_key",
|
||||
"inventory_hostname_short": "default",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__06c4a1b11530cabdf4248804078c1ddacfb88b5e",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905/.vagrant/provisioners/ansible/inventory",
|
||||
"ansible_host": "127.0.0.1",
|
||||
"ansible_user": "vagrant",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"default"
|
||||
],
|
||||
"all": [
|
||||
"default"
|
||||
]
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"omit": "__omit_place_holder__06c4a1b11530cabdf4248804078c1ddacfb88b5e",
|
||||
"ansible_port": 2202,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_user": "vagrant"
|
||||
},
|
||||
"ansible_accelerate_port": 5099,
|
||||
"roledir": null,
|
||||
"ansible_ssh_extra_args": "",
|
||||
"environment": [],
|
||||
"ansible_current_hosts": [
|
||||
"default"
|
||||
],
|
||||
"hostvars": {
|
||||
"default": {
|
||||
"inventory_file": null,
|
||||
"ansible_check_mode": false,
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"default"
|
||||
],
|
||||
"all": [
|
||||
"default"
|
||||
]
|
||||
},
|
||||
"ansible_port": 2202,
|
||||
"inventory_hostname": "default",
|
||||
"ansible_ssh_private_key_file": "/home/jtanner/workspace/issues/AP-15905/.vagrant/machines/default/virtualbox/private_key",
|
||||
"inventory_hostname_short": "default",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__06c4a1b11530cabdf4248804078c1ddacfb88b5e",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905/.vagrant/provisioners/ansible/inventory",
|
||||
"ansible_host": "127.0.0.1",
|
||||
"ansible_user": "vagrant",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_ssh_pipelining": false,
|
||||
"inventory_file": null,
|
||||
"ansible_module_compression": "ZIP_DEFLATED",
|
||||
"ansible_failed_hosts": [],
|
||||
"ansible_check_mode": false,
|
||||
"ansible_port": 2202,
|
||||
"ansible_private_key_file": "/home/jtanner/workspace/issues/AP-15905/.vagrant/machines/default/virtualbox/private_key",
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"default"
|
||||
],
|
||||
"all": [
|
||||
"default"
|
||||
]
|
||||
},
|
||||
"ansible_port": 2202,
|
||||
"ansible_host": "127.0.0.1",
|
||||
"ansible_shell_executable": "/bin/sh",
|
||||
"inventory_hostname_short": "default",
|
||||
"omit": "__omit_place_holder__06c4a1b11530cabdf4248804078c1ddacfb88b5e",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905/.vagrant/provisioners/ansible/inventory",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "vagrant",
|
||||
"role_names": [],
|
||||
"play_hosts": [
|
||||
"default"
|
||||
],
|
||||
"ansible_sftp_extra_args": ""
|
||||
}
|
@ -0,0 +1,169 @@
|
||||
{
|
||||
"ansible_pipelining": false,
|
||||
"ansible_docker_extra_args": "",
|
||||
"ansible_scp_extra_args": "",
|
||||
"ansible_user": "vagrant",
|
||||
"ansible_play_hosts": [
|
||||
"default"
|
||||
],
|
||||
"ansible_connection": "ssh",
|
||||
"ansible_ssh_common_args": "",
|
||||
"ansible_host": "127.0.0.1",
|
||||
"inventory_hostname": "default",
|
||||
"ansible_ssh_private_key_file": "/home/jtanner/workspace/issues/AP-15905/.vagrant/machines/default/virtualbox/private_key",
|
||||
"vars": {
|
||||
"ansible_check_mode": false,
|
||||
"environment": [],
|
||||
"inventory_hostname": "default",
|
||||
"inventory_file": null,
|
||||
"ansible_ssh_private_key_file": "/home/jtanner/workspace/issues/AP-15905/.vagrant/machines/default/virtualbox/private_key",
|
||||
"inventory_hostname_short": "default",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"role_names": [],
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905/.vagrant/provisioners/ansible/inventory",
|
||||
"ansible_host": "127.0.0.1",
|
||||
"play_hosts": [
|
||||
"default"
|
||||
],
|
||||
"ansible_play_hosts": [
|
||||
"default"
|
||||
],
|
||||
"hostvars": {
|
||||
"default": {
|
||||
"inventory_file": null,
|
||||
"ansible_check_mode": false,
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"default",
|
||||
"::1"
|
||||
],
|
||||
"all": [
|
||||
"default",
|
||||
"::1"
|
||||
]
|
||||
},
|
||||
"ansible_port": 2202,
|
||||
"inventory_hostname": "default",
|
||||
"ansible_ssh_private_key_file": "/home/jtanner/workspace/issues/AP-15905/.vagrant/machines/default/virtualbox/private_key",
|
||||
"inventory_hostname_short": "default",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__06c4a1b11530cabdf4248804078c1ddacfb88b5e",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905/.vagrant/provisioners/ansible/inventory",
|
||||
"ansible_host": "127.0.0.1",
|
||||
"ansible_user": "vagrant",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"default"
|
||||
],
|
||||
"all": [
|
||||
"default"
|
||||
]
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"omit": "__omit_place_holder__06c4a1b11530cabdf4248804078c1ddacfb88b5e",
|
||||
"ansible_port": 2202,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_user": "vagrant"
|
||||
},
|
||||
"ansible_accelerate_port": 5099,
|
||||
"roledir": null,
|
||||
"ansible_ssh_extra_args": "",
|
||||
"environment": [],
|
||||
"ansible_current_hosts": [
|
||||
"default"
|
||||
],
|
||||
"hostvars": {
|
||||
"default": {
|
||||
"inventory_file": null,
|
||||
"ansible_check_mode": false,
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"default",
|
||||
"::1"
|
||||
],
|
||||
"all": [
|
||||
"default",
|
||||
"::1"
|
||||
]
|
||||
},
|
||||
"ansible_port": 2202,
|
||||
"inventory_hostname": "default",
|
||||
"ansible_ssh_private_key_file": "/home/jtanner/workspace/issues/AP-15905/.vagrant/machines/default/virtualbox/private_key",
|
||||
"inventory_hostname_short": "default",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__06c4a1b11530cabdf4248804078c1ddacfb88b5e",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905/.vagrant/provisioners/ansible/inventory",
|
||||
"ansible_host": "127.0.0.1",
|
||||
"ansible_user": "vagrant",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_ssh_pipelining": false,
|
||||
"inventory_file": null,
|
||||
"ansible_module_compression": "ZIP_DEFLATED",
|
||||
"ansible_failed_hosts": [],
|
||||
"ansible_check_mode": false,
|
||||
"ansible_port": 2202,
|
||||
"ansible_private_key_file": "/home/jtanner/workspace/issues/AP-15905/.vagrant/machines/default/virtualbox/private_key",
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"default"
|
||||
],
|
||||
"all": [
|
||||
"default"
|
||||
]
|
||||
},
|
||||
"ansible_port": 2202,
|
||||
"ansible_host": "127.0.0.1",
|
||||
"ansible_shell_executable": "/bin/sh",
|
||||
"inventory_hostname_short": "default",
|
||||
"omit": "__omit_place_holder__06c4a1b11530cabdf4248804078c1ddacfb88b5e",
|
||||
"ansible_python_interpreter": "/usr/bin/python",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905/.vagrant/provisioners/ansible/inventory",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "vagrant",
|
||||
"role_names": [],
|
||||
"play_hosts": [
|
||||
"default"
|
||||
],
|
||||
"ansible_sftp_extra_args": ""
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
task:
|
||||
#become: None
|
||||
task_args:
|
||||
src: /tmp/deleteme
|
||||
dest: /tmp/deleteme
|
||||
fixtures:
|
||||
taskvars_in: task_vars_in.json
|
||||
taskvars_out: task_vars_out.json
|
||||
connection:
|
||||
transport: 'ssh'
|
||||
_play_context:
|
||||
become: True
|
||||
remote_addr: '127.0.0.1'
|
||||
remote_user: vagrant
|
||||
hostvars:
|
||||
'127.0.0.1': {}
|
||||
'::1': {}
|
||||
'localhost': {}
|
||||
asserts:
|
||||
- "hasattr(SAM._connection, 'ismock')"
|
||||
- "SAM._connection.transport == 'local'"
|
||||
- "self.execute_called"
|
||||
- "self.final_module_args['_local_rsync_path'] == 'rsync'"
|
||||
- "self.final_module_args['dest_port'] == 2202"
|
||||
- "self.final_module_args['src'] == '/tmp/deleteme'"
|
||||
- "self.final_module_args['dest'] == 'vagrant@127.0.0.1:/tmp/deleteme'"
|
||||
- "self._play_context.shell == 'sh'"
|
||||
- "self._play_context.remote_addr == '127.0.0.1'"
|
||||
- "self._play_context.remote_user == 'vagrant'"
|
||||
- "self._play_context.become == False"
|
||||
- "self._play_context.become_user == 'root'"
|
||||
- "self._play_context.password == None"
|
@ -0,0 +1,7 @@
|
||||
{
|
||||
"dest": "/tmp/deleteme",
|
||||
"src": "/tmp/deleteme",
|
||||
"private_key": "/home/jtanner/workspace/issues/AP-15905/.vagrant/machines/default/virtualbox/private_key",
|
||||
"dest_port": 2202,
|
||||
"_local_rsync_path": "rsync"
|
||||
}
|
@ -0,0 +1,164 @@
|
||||
{
|
||||
"ansible_pipelining": false,
|
||||
"ansible_docker_extra_args": "",
|
||||
"ansible_scp_extra_args": "",
|
||||
"ansible_user": "vagrant",
|
||||
"ansible_play_hosts": [
|
||||
"default"
|
||||
],
|
||||
"ansible_connection": "ssh",
|
||||
"ansible_ssh_common_args": "",
|
||||
"ansible_host": "127.0.0.1",
|
||||
"inventory_hostname": "default",
|
||||
"ansible_ssh_private_key_file": "/home/jtanner/workspace/issues/AP-15905/.vagrant/machines/default/virtualbox/private_key",
|
||||
"vars": {
|
||||
"ansible_check_mode": false,
|
||||
"environment": [],
|
||||
"inventory_hostname": "default",
|
||||
"inventory_file": null,
|
||||
"ansible_ssh_private_key_file": "/home/jtanner/workspace/issues/AP-15905/.vagrant/machines/default/virtualbox/private_key",
|
||||
"inventory_hostname_short": "default",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"role_names": [],
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905/.vagrant/provisioners/ansible/inventory",
|
||||
"ansible_host": "127.0.0.1",
|
||||
"play_hosts": [
|
||||
"default"
|
||||
],
|
||||
"ansible_play_hosts": [
|
||||
"default"
|
||||
],
|
||||
"hostvars": {
|
||||
"default": {
|
||||
"inventory_file": null,
|
||||
"ansible_check_mode": false,
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"default"
|
||||
],
|
||||
"all": [
|
||||
"default"
|
||||
]
|
||||
},
|
||||
"ansible_port": 2202,
|
||||
"inventory_hostname": "default",
|
||||
"ansible_ssh_private_key_file": "/home/jtanner/workspace/issues/AP-15905/.vagrant/machines/default/virtualbox/private_key",
|
||||
"inventory_hostname_short": "default",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__c360b80aa60ddd99087425dcd3a2094cdd5b8474",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905/.vagrant/provisioners/ansible/inventory",
|
||||
"ansible_host": "127.0.0.1",
|
||||
"ansible_user": "vagrant",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"default"
|
||||
],
|
||||
"all": [
|
||||
"default"
|
||||
]
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"omit": "__omit_place_holder__c360b80aa60ddd99087425dcd3a2094cdd5b8474",
|
||||
"ansible_port": 2202,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_user": "vagrant"
|
||||
},
|
||||
"ansible_accelerate_port": 5099,
|
||||
"roledir": null,
|
||||
"ansible_ssh_extra_args": "",
|
||||
"environment": [],
|
||||
"ansible_current_hosts": [
|
||||
"default"
|
||||
],
|
||||
"hostvars": {
|
||||
"default": {
|
||||
"inventory_file": null,
|
||||
"ansible_check_mode": false,
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"default"
|
||||
],
|
||||
"all": [
|
||||
"default"
|
||||
]
|
||||
},
|
||||
"ansible_port": 2202,
|
||||
"inventory_hostname": "default",
|
||||
"ansible_ssh_private_key_file": "/home/jtanner/workspace/issues/AP-15905/.vagrant/machines/default/virtualbox/private_key",
|
||||
"inventory_hostname_short": "default",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__c360b80aa60ddd99087425dcd3a2094cdd5b8474",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905/.vagrant/provisioners/ansible/inventory",
|
||||
"ansible_host": "127.0.0.1",
|
||||
"ansible_user": "vagrant",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_ssh_pipelining": false,
|
||||
"inventory_file": null,
|
||||
"ansible_module_compression": "ZIP_DEFLATED",
|
||||
"ansible_failed_hosts": [],
|
||||
"ansible_check_mode": false,
|
||||
"ansible_port": 2202,
|
||||
"ansible_private_key_file": "/home/jtanner/workspace/issues/AP-15905/.vagrant/machines/default/virtualbox/private_key",
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"default"
|
||||
],
|
||||
"all": [
|
||||
"default"
|
||||
]
|
||||
},
|
||||
"ansible_port": 2202,
|
||||
"ansible_host": "127.0.0.1",
|
||||
"ansible_shell_executable": "/bin/sh",
|
||||
"inventory_hostname_short": "default",
|
||||
"omit": "__omit_place_holder__c360b80aa60ddd99087425dcd3a2094cdd5b8474",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905/.vagrant/provisioners/ansible/inventory",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "vagrant",
|
||||
"role_names": [],
|
||||
"play_hosts": [
|
||||
"default"
|
||||
],
|
||||
"ansible_sftp_extra_args": ""
|
||||
}
|
@ -0,0 +1,169 @@
|
||||
{
|
||||
"ansible_pipelining": false,
|
||||
"ansible_docker_extra_args": "",
|
||||
"ansible_scp_extra_args": "",
|
||||
"ansible_user": "vagrant",
|
||||
"ansible_play_hosts": [
|
||||
"default"
|
||||
],
|
||||
"ansible_connection": "ssh",
|
||||
"ansible_ssh_common_args": "",
|
||||
"ansible_host": "127.0.0.1",
|
||||
"inventory_hostname": "default",
|
||||
"ansible_ssh_private_key_file": "/home/jtanner/workspace/issues/AP-15905/.vagrant/machines/default/virtualbox/private_key",
|
||||
"vars": {
|
||||
"ansible_check_mode": false,
|
||||
"environment": [],
|
||||
"inventory_hostname": "default",
|
||||
"inventory_file": null,
|
||||
"ansible_ssh_private_key_file": "/home/jtanner/workspace/issues/AP-15905/.vagrant/machines/default/virtualbox/private_key",
|
||||
"inventory_hostname_short": "default",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"role_names": [],
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905/.vagrant/provisioners/ansible/inventory",
|
||||
"ansible_host": "127.0.0.1",
|
||||
"play_hosts": [
|
||||
"default"
|
||||
],
|
||||
"ansible_play_hosts": [
|
||||
"default"
|
||||
],
|
||||
"hostvars": {
|
||||
"default": {
|
||||
"inventory_file": null,
|
||||
"ansible_check_mode": false,
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"default",
|
||||
"::1"
|
||||
],
|
||||
"all": [
|
||||
"default",
|
||||
"::1"
|
||||
]
|
||||
},
|
||||
"ansible_port": 2202,
|
||||
"inventory_hostname": "default",
|
||||
"ansible_ssh_private_key_file": "/home/jtanner/workspace/issues/AP-15905/.vagrant/machines/default/virtualbox/private_key",
|
||||
"inventory_hostname_short": "default",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__c360b80aa60ddd99087425dcd3a2094cdd5b8474",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905/.vagrant/provisioners/ansible/inventory",
|
||||
"ansible_host": "127.0.0.1",
|
||||
"ansible_user": "vagrant",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"default"
|
||||
],
|
||||
"all": [
|
||||
"default"
|
||||
]
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"omit": "__omit_place_holder__c360b80aa60ddd99087425dcd3a2094cdd5b8474",
|
||||
"ansible_port": 2202,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_user": "vagrant"
|
||||
},
|
||||
"ansible_accelerate_port": 5099,
|
||||
"roledir": null,
|
||||
"ansible_ssh_extra_args": "",
|
||||
"environment": [],
|
||||
"ansible_current_hosts": [
|
||||
"default"
|
||||
],
|
||||
"hostvars": {
|
||||
"default": {
|
||||
"inventory_file": null,
|
||||
"ansible_check_mode": false,
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"default",
|
||||
"::1"
|
||||
],
|
||||
"all": [
|
||||
"default",
|
||||
"::1"
|
||||
]
|
||||
},
|
||||
"ansible_port": 2202,
|
||||
"inventory_hostname": "default",
|
||||
"ansible_ssh_private_key_file": "/home/jtanner/workspace/issues/AP-15905/.vagrant/machines/default/virtualbox/private_key",
|
||||
"inventory_hostname_short": "default",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__c360b80aa60ddd99087425dcd3a2094cdd5b8474",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905/.vagrant/provisioners/ansible/inventory",
|
||||
"ansible_host": "127.0.0.1",
|
||||
"ansible_user": "vagrant",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_ssh_pipelining": false,
|
||||
"inventory_file": null,
|
||||
"ansible_module_compression": "ZIP_DEFLATED",
|
||||
"ansible_failed_hosts": [],
|
||||
"ansible_check_mode": false,
|
||||
"ansible_port": 2202,
|
||||
"ansible_private_key_file": "/home/jtanner/workspace/issues/AP-15905/.vagrant/machines/default/virtualbox/private_key",
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"default"
|
||||
],
|
||||
"all": [
|
||||
"default"
|
||||
]
|
||||
},
|
||||
"ansible_port": 2202,
|
||||
"ansible_host": "127.0.0.1",
|
||||
"ansible_shell_executable": "/bin/sh",
|
||||
"inventory_hostname_short": "default",
|
||||
"omit": "__omit_place_holder__c360b80aa60ddd99087425dcd3a2094cdd5b8474",
|
||||
"ansible_python_interpreter": "/usr/bin/python",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905/.vagrant/provisioners/ansible/inventory",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "vagrant",
|
||||
"role_names": [],
|
||||
"play_hosts": [
|
||||
"default"
|
||||
],
|
||||
"ansible_sftp_extra_args": ""
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
task_args:
|
||||
src: /tmp/deleteme
|
||||
dest: /tmp/deleteme
|
||||
fixtures:
|
||||
taskvars_in: task_vars_in.json
|
||||
taskvars_out: task_vars_out.json
|
||||
connection:
|
||||
transport: 'ssh'
|
||||
_play_context:
|
||||
remote_addr: '127.0.0.1'
|
||||
remote_user: vagrant
|
||||
hostvars:
|
||||
'127.0.0.1': {}
|
||||
'::1': {}
|
||||
'localhost': {}
|
||||
asserts:
|
||||
- "hasattr(SAM._connection, 'ismock')"
|
||||
- "SAM._connection.transport == 'local'"
|
||||
- "self.execute_called"
|
||||
- "self.final_module_args['_local_rsync_path'] == 'rsync'"
|
||||
- "self.final_module_args['dest_port'] == 2202"
|
||||
- "self.final_module_args['src'] == '/tmp/deleteme'"
|
||||
- "self.final_module_args['dest'] == 'vagrant@127.0.0.1:/tmp/deleteme'"
|
||||
- "self._play_context.shell == 'sh'"
|
||||
- "self._play_context.remote_addr == '127.0.0.1'"
|
||||
- "self._play_context.remote_user == 'vagrant'"
|
||||
- "self._play_context.become == False"
|
||||
- "self._play_context.become_user == 'root'"
|
||||
- "self._play_context.password == None"
|
@ -0,0 +1,7 @@
|
||||
{
|
||||
"dest": "/tmp/deleteme",
|
||||
"src": "/tmp/deleteme",
|
||||
"private_key": "/home/jtanner/workspace/issues/AP-15905/.vagrant/machines/default/virtualbox/private_key",
|
||||
"dest_port": 2202,
|
||||
"_local_rsync_path": "rsync"
|
||||
}
|
@ -0,0 +1,164 @@
|
||||
{
|
||||
"ansible_pipelining": false,
|
||||
"ansible_docker_extra_args": "",
|
||||
"ansible_scp_extra_args": "",
|
||||
"ansible_user": "vagrant",
|
||||
"ansible_play_hosts": [
|
||||
"default"
|
||||
],
|
||||
"ansible_connection": "ssh",
|
||||
"ansible_ssh_common_args": "",
|
||||
"ansible_host": "127.0.0.1",
|
||||
"inventory_hostname": "default",
|
||||
"ansible_ssh_private_key_file": "/home/jtanner/workspace/issues/AP-15905/.vagrant/machines/default/virtualbox/private_key",
|
||||
"vars": {
|
||||
"ansible_check_mode": false,
|
||||
"environment": [],
|
||||
"inventory_hostname": "default",
|
||||
"inventory_file": null,
|
||||
"ansible_ssh_private_key_file": "/home/jtanner/workspace/issues/AP-15905/.vagrant/machines/default/virtualbox/private_key",
|
||||
"inventory_hostname_short": "default",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"role_names": [],
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905/.vagrant/provisioners/ansible/inventory",
|
||||
"ansible_host": "127.0.0.1",
|
||||
"play_hosts": [
|
||||
"default"
|
||||
],
|
||||
"ansible_play_hosts": [
|
||||
"default"
|
||||
],
|
||||
"hostvars": {
|
||||
"default": {
|
||||
"inventory_file": null,
|
||||
"ansible_check_mode": false,
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"default"
|
||||
],
|
||||
"all": [
|
||||
"default"
|
||||
]
|
||||
},
|
||||
"ansible_port": 2202,
|
||||
"inventory_hostname": "default",
|
||||
"ansible_ssh_private_key_file": "/home/jtanner/workspace/issues/AP-15905/.vagrant/machines/default/virtualbox/private_key",
|
||||
"inventory_hostname_short": "default",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__c360b80aa60ddd99087425dcd3a2094cdd5b8474",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905/.vagrant/provisioners/ansible/inventory",
|
||||
"ansible_host": "127.0.0.1",
|
||||
"ansible_user": "vagrant",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"default"
|
||||
],
|
||||
"all": [
|
||||
"default"
|
||||
]
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"omit": "__omit_place_holder__c360b80aa60ddd99087425dcd3a2094cdd5b8474",
|
||||
"ansible_port": 2202,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_user": "vagrant"
|
||||
},
|
||||
"ansible_accelerate_port": 5099,
|
||||
"roledir": null,
|
||||
"ansible_ssh_extra_args": "",
|
||||
"environment": [],
|
||||
"ansible_current_hosts": [
|
||||
"default"
|
||||
],
|
||||
"hostvars": {
|
||||
"default": {
|
||||
"inventory_file": null,
|
||||
"ansible_check_mode": false,
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"default"
|
||||
],
|
||||
"all": [
|
||||
"default"
|
||||
]
|
||||
},
|
||||
"ansible_port": 2202,
|
||||
"inventory_hostname": "default",
|
||||
"ansible_ssh_private_key_file": "/home/jtanner/workspace/issues/AP-15905/.vagrant/machines/default/virtualbox/private_key",
|
||||
"inventory_hostname_short": "default",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__c360b80aa60ddd99087425dcd3a2094cdd5b8474",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905/.vagrant/provisioners/ansible/inventory",
|
||||
"ansible_host": "127.0.0.1",
|
||||
"ansible_user": "vagrant",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_ssh_pipelining": false,
|
||||
"inventory_file": null,
|
||||
"ansible_module_compression": "ZIP_DEFLATED",
|
||||
"ansible_failed_hosts": [],
|
||||
"ansible_check_mode": false,
|
||||
"ansible_port": 2202,
|
||||
"ansible_private_key_file": "/home/jtanner/workspace/issues/AP-15905/.vagrant/machines/default/virtualbox/private_key",
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"default"
|
||||
],
|
||||
"all": [
|
||||
"default"
|
||||
]
|
||||
},
|
||||
"ansible_port": 2202,
|
||||
"ansible_host": "127.0.0.1",
|
||||
"ansible_shell_executable": "/bin/sh",
|
||||
"inventory_hostname_short": "default",
|
||||
"omit": "__omit_place_holder__c360b80aa60ddd99087425dcd3a2094cdd5b8474",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905/.vagrant/provisioners/ansible/inventory",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "vagrant",
|
||||
"role_names": [],
|
||||
"play_hosts": [
|
||||
"default"
|
||||
],
|
||||
"ansible_sftp_extra_args": ""
|
||||
}
|
@ -0,0 +1,169 @@
|
||||
{
|
||||
"ansible_pipelining": false,
|
||||
"ansible_docker_extra_args": "",
|
||||
"ansible_scp_extra_args": "",
|
||||
"ansible_user": "vagrant",
|
||||
"ansible_play_hosts": [
|
||||
"default"
|
||||
],
|
||||
"ansible_connection": "ssh",
|
||||
"ansible_ssh_common_args": "",
|
||||
"ansible_host": "127.0.0.1",
|
||||
"inventory_hostname": "default",
|
||||
"ansible_ssh_private_key_file": "/home/jtanner/workspace/issues/AP-15905/.vagrant/machines/default/virtualbox/private_key",
|
||||
"vars": {
|
||||
"ansible_check_mode": false,
|
||||
"environment": [],
|
||||
"inventory_hostname": "default",
|
||||
"inventory_file": null,
|
||||
"ansible_ssh_private_key_file": "/home/jtanner/workspace/issues/AP-15905/.vagrant/machines/default/virtualbox/private_key",
|
||||
"inventory_hostname_short": "default",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"role_names": [],
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905/.vagrant/provisioners/ansible/inventory",
|
||||
"ansible_host": "127.0.0.1",
|
||||
"play_hosts": [
|
||||
"default"
|
||||
],
|
||||
"ansible_play_hosts": [
|
||||
"default"
|
||||
],
|
||||
"hostvars": {
|
||||
"default": {
|
||||
"inventory_file": null,
|
||||
"ansible_check_mode": false,
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"default",
|
||||
"::1"
|
||||
],
|
||||
"all": [
|
||||
"default",
|
||||
"::1"
|
||||
]
|
||||
},
|
||||
"ansible_port": 2202,
|
||||
"inventory_hostname": "default",
|
||||
"ansible_ssh_private_key_file": "/home/jtanner/workspace/issues/AP-15905/.vagrant/machines/default/virtualbox/private_key",
|
||||
"inventory_hostname_short": "default",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__c360b80aa60ddd99087425dcd3a2094cdd5b8474",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905/.vagrant/provisioners/ansible/inventory",
|
||||
"ansible_host": "127.0.0.1",
|
||||
"ansible_user": "vagrant",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"default"
|
||||
],
|
||||
"all": [
|
||||
"default"
|
||||
]
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"omit": "__omit_place_holder__c360b80aa60ddd99087425dcd3a2094cdd5b8474",
|
||||
"ansible_port": 2202,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_user": "vagrant"
|
||||
},
|
||||
"ansible_accelerate_port": 5099,
|
||||
"roledir": null,
|
||||
"ansible_ssh_extra_args": "",
|
||||
"environment": [],
|
||||
"ansible_current_hosts": [
|
||||
"default"
|
||||
],
|
||||
"hostvars": {
|
||||
"default": {
|
||||
"inventory_file": null,
|
||||
"ansible_check_mode": false,
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"default",
|
||||
"::1"
|
||||
],
|
||||
"all": [
|
||||
"default",
|
||||
"::1"
|
||||
]
|
||||
},
|
||||
"ansible_port": 2202,
|
||||
"inventory_hostname": "default",
|
||||
"ansible_ssh_private_key_file": "/home/jtanner/workspace/issues/AP-15905/.vagrant/machines/default/virtualbox/private_key",
|
||||
"inventory_hostname_short": "default",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__c360b80aa60ddd99087425dcd3a2094cdd5b8474",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905/.vagrant/provisioners/ansible/inventory",
|
||||
"ansible_host": "127.0.0.1",
|
||||
"ansible_user": "vagrant",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_ssh_pipelining": false,
|
||||
"inventory_file": null,
|
||||
"ansible_module_compression": "ZIP_DEFLATED",
|
||||
"ansible_failed_hosts": [],
|
||||
"ansible_check_mode": false,
|
||||
"ansible_port": 2202,
|
||||
"ansible_private_key_file": "/home/jtanner/workspace/issues/AP-15905/.vagrant/machines/default/virtualbox/private_key",
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"default"
|
||||
],
|
||||
"all": [
|
||||
"default"
|
||||
]
|
||||
},
|
||||
"ansible_port": 2202,
|
||||
"ansible_host": "127.0.0.1",
|
||||
"ansible_shell_executable": "/bin/sh",
|
||||
"inventory_hostname_short": "default",
|
||||
"omit": "__omit_place_holder__c360b80aa60ddd99087425dcd3a2094cdd5b8474",
|
||||
"ansible_python_interpreter": "/usr/bin/python",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905/.vagrant/provisioners/ansible/inventory",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "vagrant",
|
||||
"role_names": [],
|
||||
"play_hosts": [
|
||||
"default"
|
||||
],
|
||||
"ansible_sftp_extra_args": ""
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
fixtures:
|
||||
taskvars_in: taskvars_in.json
|
||||
taskvars_out: taskvars_out.json
|
||||
connection:
|
||||
transport: 'ssh'
|
||||
hostvars:
|
||||
'127.0.0.1': {}
|
||||
'::1': {}
|
||||
'localhost': {}
|
||||
_play_context:
|
||||
private_key_file: ~/test.pem
|
||||
task_args:
|
||||
private_key: ~/.ssh/id_rsa
|
||||
dest: /tmp/deleteme
|
||||
src: /tmp/deleteme
|
||||
|
||||
asserts:
|
||||
- "hasattr(SAM._connection, 'ismock')"
|
||||
- "SAM._connection.transport == 'local'"
|
||||
- "self._play_context.shell == 'sh'"
|
||||
- "self.execute_called"
|
||||
- "self.final_module_args['_local_rsync_path'] == 'rsync'"
|
||||
- "self.final_module_args['src'] == '/tmp/deleteme'"
|
||||
- "self.final_module_args['dest'] == 'root@el6host:/tmp/deleteme'"
|
||||
- "self.final_module_args['private_key'] == '~/.ssh/id_rsa'"
|
@ -0,0 +1,151 @@
|
||||
{
|
||||
"ansible_pipelining": false,
|
||||
"ansible_docker_extra_args": "",
|
||||
"ansible_scp_extra_args": "",
|
||||
"ansible_user": "root",
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_connection": "smart",
|
||||
"ansible_ssh_common_args": "",
|
||||
"environment": [],
|
||||
"inventory_hostname": "el6host",
|
||||
"vars": {
|
||||
"ansible_check_mode": false,
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_file": "inventory",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"role_names": [],
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"environment": [],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"hostvars": {
|
||||
"el6host": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host"
|
||||
],
|
||||
"all": [
|
||||
"el6host"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__03600813b83569c710bf5cb2a040d6e01da927c6",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host"
|
||||
],
|
||||
"all": [
|
||||
"el6host"
|
||||
]
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"omit": "__omit_place_holder__03600813b83569c710bf5cb2a040d6e01da927c6",
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_user": "root"
|
||||
},
|
||||
"ansible_accelerate_port": 5099,
|
||||
"roledir": null,
|
||||
"ansible_ssh_extra_args": "",
|
||||
"ansible_host": "el6host",
|
||||
"ansible_current_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"hostvars": {
|
||||
"el6host": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host"
|
||||
],
|
||||
"all": [
|
||||
"el6host"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__03600813b83569c710bf5cb2a040d6e01da927c6",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_ssh_pipelining": false,
|
||||
"inventory_file": "inventory",
|
||||
"ansible_module_compression": "ZIP_DEFLATED",
|
||||
"ansible_failed_hosts": [],
|
||||
"ansible_check_mode": false,
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host"
|
||||
],
|
||||
"all": [
|
||||
"el6host"
|
||||
]
|
||||
},
|
||||
"ansible_host": "el6host",
|
||||
"ansible_shell_executable": "/bin/sh",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"omit": "__omit_place_holder__03600813b83569c710bf5cb2a040d6e01da927c6",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"role_names": [],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_sftp_extra_args": ""
|
||||
}
|
@ -0,0 +1,156 @@
|
||||
{
|
||||
"ansible_pipelining": false,
|
||||
"ansible_docker_extra_args": "",
|
||||
"ansible_scp_extra_args": "",
|
||||
"ansible_user": "root",
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_connection": "smart",
|
||||
"ansible_ssh_common_args": "",
|
||||
"environment": [],
|
||||
"inventory_hostname": "el6host",
|
||||
"vars": {
|
||||
"ansible_check_mode": false,
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_file": "inventory",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"role_names": [],
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"environment": [],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"hostvars": {
|
||||
"el6host": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"::1"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"::1"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__03600813b83569c710bf5cb2a040d6e01da927c6",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host"
|
||||
],
|
||||
"all": [
|
||||
"el6host"
|
||||
]
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"omit": "__omit_place_holder__03600813b83569c710bf5cb2a040d6e01da927c6",
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_user": "root"
|
||||
},
|
||||
"ansible_accelerate_port": 5099,
|
||||
"roledir": null,
|
||||
"ansible_ssh_extra_args": "",
|
||||
"ansible_host": "el6host",
|
||||
"ansible_current_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"hostvars": {
|
||||
"el6host": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"::1"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"::1"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__03600813b83569c710bf5cb2a040d6e01da927c6",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_ssh_pipelining": false,
|
||||
"inventory_file": "inventory",
|
||||
"ansible_module_compression": "ZIP_DEFLATED",
|
||||
"ansible_failed_hosts": [],
|
||||
"ansible_check_mode": false,
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host"
|
||||
],
|
||||
"all": [
|
||||
"el6host"
|
||||
]
|
||||
},
|
||||
"ansible_host": "el6host",
|
||||
"ansible_shell_executable": "/bin/sh",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"omit": "__omit_place_holder__03600813b83569c710bf5cb2a040d6e01da927c6",
|
||||
"ansible_python_interpreter": "/usr/bin/python",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"role_names": [],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_sftp_extra_args": ""
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
fixtures:
|
||||
taskvars_in: task_vars_in.json
|
||||
taskvars_out: task_vars_out.json
|
||||
task_args:
|
||||
src: /tmp/deleteme
|
||||
dest: /tmp/deleteme
|
||||
_task:
|
||||
delegate_to: u1404
|
||||
_play_context:
|
||||
shell: None
|
||||
remote_addr: u1404
|
||||
remote_user: root
|
||||
connection:
|
||||
transport: 'ssh'
|
||||
hostvars:
|
||||
'127.0.0.1': {}
|
||||
'::1': {}
|
||||
'localhost': {}
|
||||
asserts:
|
||||
- "hasattr(SAM._connection, 'ismock')"
|
||||
- "SAM._connection.transport == 'ssh'"
|
||||
- "self._play_context.shell == None"
|
||||
- "self.execute_called"
|
||||
- "self.final_module_args['_local_rsync_path'] == 'rsync'"
|
||||
- "self.final_module_args['src'] == '/tmp/deleteme'"
|
||||
- "self.final_module_args['dest'] == 'root@el6host:/tmp/deleteme'"
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
"dest": "el6host:/tmp/deleteme",
|
||||
"src": "/tmp/deleteme",
|
||||
"_local_rsync_path": "rsync"
|
||||
}
|
@ -0,0 +1,379 @@
|
||||
{
|
||||
"ansible_pipelining": false,
|
||||
"ansible_docker_extra_args": "",
|
||||
"ansible_scp_extra_args": "",
|
||||
"ansible_user": "root",
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_connection": "smart",
|
||||
"ansible_ssh_common_args": "",
|
||||
"environment": [],
|
||||
"inventory_hostname": "el6host",
|
||||
"vars": {
|
||||
"ansible_check_mode": false,
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_file": "inventory",
|
||||
"ansible_delegated_vars": {
|
||||
"u1404": {
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_file": "inventory",
|
||||
"vars": {
|
||||
"inventory_file": "inventory",
|
||||
"role_names": [],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"ansible_check_mode": false,
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"environment": [],
|
||||
"ansible_user": "root",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
},
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"ansible_host": "u1404",
|
||||
"environment": [],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"ansible_check_mode": false,
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"role_names": [],
|
||||
"ansible_port": null,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_user": "root"
|
||||
}
|
||||
},
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"role_names": [],
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"environment": [],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"hostvars": {
|
||||
"el6host": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
},
|
||||
"u1404": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_user": "root"
|
||||
},
|
||||
"ansible_accelerate_port": 5099,
|
||||
"roledir": null,
|
||||
"ansible_ssh_extra_args": "",
|
||||
"ansible_host": "u1404",
|
||||
"ansible_current_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"hostvars": {
|
||||
"el6host": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
},
|
||||
"u1404": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_ssh_pipelining": false,
|
||||
"inventory_file": "inventory",
|
||||
"ansible_delegated_vars": {
|
||||
"u1404": {
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_file": "inventory",
|
||||
"vars": {
|
||||
"ansible_check_mode": false,
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_file": "inventory",
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"environment": [],
|
||||
"ansible_user": "root",
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"role_names": []
|
||||
},
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"ansible_host": "u1404",
|
||||
"environment": [],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"ansible_check_mode": false,
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"role_names": [],
|
||||
"ansible_port": null,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_user": "root"
|
||||
}
|
||||
},
|
||||
"ansible_module_compression": "ZIP_DEFLATED",
|
||||
"ansible_failed_hosts": [],
|
||||
"ansible_check_mode": false,
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"ansible_host": "u1404",
|
||||
"ansible_shell_executable": "/bin/sh",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"role_names": [],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_sftp_extra_args": ""
|
||||
}
|
@ -0,0 +1,387 @@
|
||||
{
|
||||
"ansible_pipelining": false,
|
||||
"ansible_docker_extra_args": "",
|
||||
"ansible_scp_extra_args": "",
|
||||
"ansible_user": "root",
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_connection": "smart",
|
||||
"ansible_ssh_common_args": "",
|
||||
"environment": [],
|
||||
"inventory_hostname": "el6host",
|
||||
"vars": {
|
||||
"ansible_check_mode": false,
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_file": "inventory",
|
||||
"ansible_delegated_vars": {
|
||||
"u1404": {
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_file": "inventory",
|
||||
"vars": {
|
||||
"inventory_file": "inventory",
|
||||
"role_names": [],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"ansible_check_mode": false,
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"environment": [],
|
||||
"ansible_user": "root",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
},
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"ansible_host": "u1404",
|
||||
"environment": [],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"ansible_check_mode": false,
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"role_names": [],
|
||||
"ansible_port": null,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_user": "root"
|
||||
}
|
||||
},
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"role_names": [],
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"environment": [],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"hostvars": {
|
||||
"el6host": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404",
|
||||
"::1"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404",
|
||||
"::1"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
},
|
||||
"u1404": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404",
|
||||
"::1"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404",
|
||||
"::1"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_user": "root"
|
||||
},
|
||||
"ansible_accelerate_port": 5099,
|
||||
"roledir": null,
|
||||
"ansible_ssh_extra_args": "",
|
||||
"ansible_host": "u1404",
|
||||
"ansible_current_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"hostvars": {
|
||||
"el6host": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404",
|
||||
"::1"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404",
|
||||
"::1"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
},
|
||||
"u1404": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404",
|
||||
"::1"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404",
|
||||
"::1"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_ssh_pipelining": false,
|
||||
"inventory_file": "inventory",
|
||||
"ansible_delegated_vars": {
|
||||
"u1404": {
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_file": "inventory",
|
||||
"vars": {
|
||||
"ansible_check_mode": false,
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_file": "inventory",
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"environment": [],
|
||||
"ansible_user": "root",
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"role_names": []
|
||||
},
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"ansible_host": "u1404",
|
||||
"environment": [],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"ansible_check_mode": false,
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"role_names": [],
|
||||
"ansible_port": null,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_user": "root"
|
||||
}
|
||||
},
|
||||
"ansible_module_compression": "ZIP_DEFLATED",
|
||||
"ansible_failed_hosts": [],
|
||||
"ansible_check_mode": false,
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"ansible_host": "u1404",
|
||||
"ansible_shell_executable": "/bin/sh",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"role_names": [],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_sftp_extra_args": ""
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
fixtures:
|
||||
taskvars_in: task_vars_in.json
|
||||
taskvars_out: task_vars_out.json
|
||||
task_args:
|
||||
src: /tmp/deleteme
|
||||
dest: /tmp/deleteme
|
||||
_task:
|
||||
delegate_to: u1404
|
||||
_play_context:
|
||||
shell: None
|
||||
remote_addr: u1404
|
||||
remote_user: root
|
||||
private_key_file: ~/test.pem
|
||||
connection:
|
||||
transport: 'ssh'
|
||||
hostvars:
|
||||
'127.0.0.1': {}
|
||||
'::1': {}
|
||||
'localhost': {}
|
||||
asserts:
|
||||
- "hasattr(SAM._connection, 'ismock')"
|
||||
- "SAM._connection.transport == 'ssh'"
|
||||
- "self._play_context.shell == None"
|
||||
- "self.execute_called"
|
||||
- "self.final_module_args['_local_rsync_path'] == 'rsync'"
|
||||
- "self.final_module_args['src'] == '/tmp/deleteme'"
|
||||
- "self.final_module_args['dest'] == 'root@el6host:/tmp/deleteme'"
|
||||
- "self.final_module_args['private_key'] == '~/test.pem'"
|
@ -0,0 +1,379 @@
|
||||
{
|
||||
"ansible_pipelining": false,
|
||||
"ansible_docker_extra_args": "",
|
||||
"ansible_scp_extra_args": "",
|
||||
"ansible_user": "root",
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_connection": "smart",
|
||||
"ansible_ssh_common_args": "",
|
||||
"environment": [],
|
||||
"inventory_hostname": "el6host",
|
||||
"vars": {
|
||||
"ansible_check_mode": false,
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_file": "inventory",
|
||||
"ansible_delegated_vars": {
|
||||
"u1404": {
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_file": "inventory",
|
||||
"vars": {
|
||||
"inventory_file": "inventory",
|
||||
"role_names": [],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"ansible_check_mode": false,
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"environment": [],
|
||||
"ansible_user": "root",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
},
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"ansible_host": "u1404",
|
||||
"environment": [],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"ansible_check_mode": false,
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"role_names": [],
|
||||
"ansible_port": null,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_user": "root"
|
||||
}
|
||||
},
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"role_names": [],
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"environment": [],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"hostvars": {
|
||||
"el6host": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
},
|
||||
"u1404": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_user": "root"
|
||||
},
|
||||
"ansible_accelerate_port": 5099,
|
||||
"roledir": null,
|
||||
"ansible_ssh_extra_args": "",
|
||||
"ansible_host": "u1404",
|
||||
"ansible_current_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"hostvars": {
|
||||
"el6host": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
},
|
||||
"u1404": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_ssh_pipelining": false,
|
||||
"inventory_file": "inventory",
|
||||
"ansible_delegated_vars": {
|
||||
"u1404": {
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_file": "inventory",
|
||||
"vars": {
|
||||
"ansible_check_mode": false,
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_file": "inventory",
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"environment": [],
|
||||
"ansible_user": "root",
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"role_names": []
|
||||
},
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"ansible_host": "u1404",
|
||||
"environment": [],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"ansible_check_mode": false,
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"role_names": [],
|
||||
"ansible_port": null,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_user": "root"
|
||||
}
|
||||
},
|
||||
"ansible_module_compression": "ZIP_DEFLATED",
|
||||
"ansible_failed_hosts": [],
|
||||
"ansible_check_mode": false,
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"ansible_host": "u1404",
|
||||
"ansible_shell_executable": "/bin/sh",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"role_names": [],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_sftp_extra_args": ""
|
||||
}
|
@ -0,0 +1,387 @@
|
||||
{
|
||||
"ansible_pipelining": false,
|
||||
"ansible_docker_extra_args": "",
|
||||
"ansible_scp_extra_args": "",
|
||||
"ansible_user": "root",
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_connection": "smart",
|
||||
"ansible_ssh_common_args": "",
|
||||
"environment": [],
|
||||
"inventory_hostname": "el6host",
|
||||
"vars": {
|
||||
"ansible_check_mode": false,
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_file": "inventory",
|
||||
"ansible_delegated_vars": {
|
||||
"u1404": {
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_file": "inventory",
|
||||
"vars": {
|
||||
"inventory_file": "inventory",
|
||||
"role_names": [],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"ansible_check_mode": false,
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"environment": [],
|
||||
"ansible_user": "root",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
},
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"ansible_host": "u1404",
|
||||
"environment": [],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"ansible_check_mode": false,
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"role_names": [],
|
||||
"ansible_port": null,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_user": "root"
|
||||
}
|
||||
},
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"role_names": [],
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"environment": [],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"hostvars": {
|
||||
"el6host": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404",
|
||||
"::1"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404",
|
||||
"::1"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
},
|
||||
"u1404": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404",
|
||||
"::1"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404",
|
||||
"::1"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_user": "root"
|
||||
},
|
||||
"ansible_accelerate_port": 5099,
|
||||
"roledir": null,
|
||||
"ansible_ssh_extra_args": "",
|
||||
"ansible_host": "u1404",
|
||||
"ansible_current_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"hostvars": {
|
||||
"el6host": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404",
|
||||
"::1"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404",
|
||||
"::1"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
},
|
||||
"u1404": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404",
|
||||
"::1"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404",
|
||||
"::1"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_ssh_pipelining": false,
|
||||
"inventory_file": "inventory",
|
||||
"ansible_delegated_vars": {
|
||||
"u1404": {
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_file": "inventory",
|
||||
"vars": {
|
||||
"ansible_check_mode": false,
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_file": "inventory",
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"environment": [],
|
||||
"ansible_user": "root",
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"role_names": []
|
||||
},
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"ansible_host": "u1404",
|
||||
"environment": [],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"ansible_check_mode": false,
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"role_names": [],
|
||||
"ansible_port": null,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_user": "root"
|
||||
}
|
||||
},
|
||||
"ansible_module_compression": "ZIP_DEFLATED",
|
||||
"ansible_failed_hosts": [],
|
||||
"ansible_check_mode": false,
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"ansible_host": "u1404",
|
||||
"ansible_shell_executable": "/bin/sh",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"role_names": [],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_sftp_extra_args": ""
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
fixtures:
|
||||
taskvars_in: task_vars_in.json
|
||||
taskvars_out: task_vars_out.json
|
||||
task_args:
|
||||
src: /tmp/deleteme
|
||||
dest: /tmp/deleteme
|
||||
_task:
|
||||
delegate_to: u1404
|
||||
_play_context:
|
||||
become: True
|
||||
become_user: None #if ! None|root, different testcase
|
||||
become_method: su
|
||||
shell: None
|
||||
remote_addr: u1404
|
||||
remote_user: root
|
||||
connection:
|
||||
transport: 'ssh'
|
||||
hostvars:
|
||||
'127.0.0.1': {}
|
||||
'::1': {}
|
||||
'localhost': {}
|
||||
asserts:
|
||||
- "hasattr(SAM._connection, 'ismock')"
|
||||
- "SAM._connection.transport == 'ssh'"
|
||||
- "self._play_context.shell == None"
|
||||
- "self._play_context.remote_addr == 'u1404'"
|
||||
- "self._play_context.remote_user == 'root'"
|
||||
- "not self._play_context.become"
|
||||
- "self._play_context.become_method == 'su'"
|
||||
- "self.execute_called"
|
||||
- "self.final_module_args['_local_rsync_path'] == 'rsync'"
|
||||
- "self.final_module_args['src'] == '/tmp/deleteme'"
|
||||
- "self.final_module_args['dest'] == 'root@el6host:/tmp/deleteme'"
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"dest": "el6host:/tmp/deleteme",
|
||||
"src": "/tmp/deleteme",
|
||||
"rsync_path": "sudo rsync",
|
||||
"_local_rsync_path": "rsync"
|
||||
}
|
@ -0,0 +1,379 @@
|
||||
{
|
||||
"ansible_pipelining": false,
|
||||
"ansible_docker_extra_args": "",
|
||||
"ansible_scp_extra_args": "",
|
||||
"ansible_user": "root",
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_connection": "smart",
|
||||
"ansible_ssh_common_args": "",
|
||||
"environment": [],
|
||||
"inventory_hostname": "el6host",
|
||||
"vars": {
|
||||
"ansible_check_mode": false,
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_file": "inventory",
|
||||
"ansible_delegated_vars": {
|
||||
"u1404": {
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_file": "inventory",
|
||||
"vars": {
|
||||
"inventory_file": "inventory",
|
||||
"role_names": [],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"ansible_check_mode": false,
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__32a8706cee222390e0d92197fb49cc967bfafb57",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"environment": [],
|
||||
"ansible_user": "root",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
},
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__32a8706cee222390e0d92197fb49cc967bfafb57",
|
||||
"ansible_host": "u1404",
|
||||
"environment": [],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"ansible_check_mode": false,
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"role_names": [],
|
||||
"ansible_port": null,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_user": "root"
|
||||
}
|
||||
},
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"role_names": [],
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"environment": [],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"hostvars": {
|
||||
"el6host": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__32a8706cee222390e0d92197fb49cc967bfafb57",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
},
|
||||
"u1404": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__32a8706cee222390e0d92197fb49cc967bfafb57",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"omit": "__omit_place_holder__32a8706cee222390e0d92197fb49cc967bfafb57",
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_user": "root"
|
||||
},
|
||||
"ansible_accelerate_port": 5099,
|
||||
"roledir": null,
|
||||
"ansible_ssh_extra_args": "",
|
||||
"ansible_host": "u1404",
|
||||
"ansible_current_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"hostvars": {
|
||||
"el6host": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__32a8706cee222390e0d92197fb49cc967bfafb57",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
},
|
||||
"u1404": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__32a8706cee222390e0d92197fb49cc967bfafb57",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_ssh_pipelining": false,
|
||||
"inventory_file": "inventory",
|
||||
"ansible_delegated_vars": {
|
||||
"u1404": {
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_file": "inventory",
|
||||
"vars": {
|
||||
"ansible_check_mode": false,
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_file": "inventory",
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__32a8706cee222390e0d92197fb49cc967bfafb57",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"environment": [],
|
||||
"ansible_user": "root",
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"role_names": []
|
||||
},
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__32a8706cee222390e0d92197fb49cc967bfafb57",
|
||||
"ansible_host": "u1404",
|
||||
"environment": [],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"ansible_check_mode": false,
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"role_names": [],
|
||||
"ansible_port": null,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_user": "root"
|
||||
}
|
||||
},
|
||||
"ansible_module_compression": "ZIP_DEFLATED",
|
||||
"ansible_failed_hosts": [],
|
||||
"ansible_check_mode": false,
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"ansible_host": "u1404",
|
||||
"ansible_shell_executable": "/bin/sh",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"omit": "__omit_place_holder__32a8706cee222390e0d92197fb49cc967bfafb57",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"role_names": [],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_sftp_extra_args": ""
|
||||
}
|
@ -0,0 +1,387 @@
|
||||
{
|
||||
"ansible_pipelining": false,
|
||||
"ansible_docker_extra_args": "",
|
||||
"ansible_scp_extra_args": "",
|
||||
"ansible_user": "root",
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_connection": "smart",
|
||||
"ansible_ssh_common_args": "",
|
||||
"environment": [],
|
||||
"inventory_hostname": "el6host",
|
||||
"vars": {
|
||||
"ansible_check_mode": false,
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_file": "inventory",
|
||||
"ansible_delegated_vars": {
|
||||
"u1404": {
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_file": "inventory",
|
||||
"vars": {
|
||||
"inventory_file": "inventory",
|
||||
"role_names": [],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"ansible_check_mode": false,
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__32a8706cee222390e0d92197fb49cc967bfafb57",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"environment": [],
|
||||
"ansible_user": "root",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
},
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__32a8706cee222390e0d92197fb49cc967bfafb57",
|
||||
"ansible_host": "u1404",
|
||||
"environment": [],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"ansible_check_mode": false,
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"role_names": [],
|
||||
"ansible_port": null,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_user": "root"
|
||||
}
|
||||
},
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"role_names": [],
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"environment": [],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"hostvars": {
|
||||
"el6host": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404",
|
||||
"::1"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404",
|
||||
"::1"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__32a8706cee222390e0d92197fb49cc967bfafb57",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
},
|
||||
"u1404": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404",
|
||||
"::1"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404",
|
||||
"::1"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__32a8706cee222390e0d92197fb49cc967bfafb57",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"omit": "__omit_place_holder__32a8706cee222390e0d92197fb49cc967bfafb57",
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_user": "root"
|
||||
},
|
||||
"ansible_accelerate_port": 5099,
|
||||
"roledir": null,
|
||||
"ansible_ssh_extra_args": "",
|
||||
"ansible_host": "u1404",
|
||||
"ansible_current_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"hostvars": {
|
||||
"el6host": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404",
|
||||
"::1"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404",
|
||||
"::1"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__32a8706cee222390e0d92197fb49cc967bfafb57",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
},
|
||||
"u1404": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404",
|
||||
"::1"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404",
|
||||
"::1"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__32a8706cee222390e0d92197fb49cc967bfafb57",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_ssh_pipelining": false,
|
||||
"inventory_file": "inventory",
|
||||
"ansible_delegated_vars": {
|
||||
"u1404": {
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_file": "inventory",
|
||||
"vars": {
|
||||
"ansible_check_mode": false,
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_file": "inventory",
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__32a8706cee222390e0d92197fb49cc967bfafb57",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"environment": [],
|
||||
"ansible_user": "root",
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"role_names": []
|
||||
},
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__32a8706cee222390e0d92197fb49cc967bfafb57",
|
||||
"ansible_host": "u1404",
|
||||
"environment": [],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"ansible_check_mode": false,
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"role_names": [],
|
||||
"ansible_port": null,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_user": "root"
|
||||
}
|
||||
},
|
||||
"ansible_module_compression": "ZIP_DEFLATED",
|
||||
"ansible_failed_hosts": [],
|
||||
"ansible_check_mode": false,
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"ansible_host": "u1404",
|
||||
"ansible_shell_executable": "/bin/sh",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"omit": "__omit_place_holder__32a8706cee222390e0d92197fb49cc967bfafb57",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"role_names": [],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_sftp_extra_args": ""
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
fixtures:
|
||||
taskvars_in: task_vars_in.json
|
||||
taskvars_out: task_vars_out.json
|
||||
task_args:
|
||||
src: /tmp/deleteme
|
||||
dest: /tmp/deleteme
|
||||
private_key: ~/.ssh/id_rsa
|
||||
_task:
|
||||
delegate_to: u1404
|
||||
_play_context:
|
||||
shell: None
|
||||
remote_addr: u1404
|
||||
remote_user: root
|
||||
private_key_file: ~/test.pem
|
||||
connection:
|
||||
transport: 'ssh'
|
||||
hostvars:
|
||||
'127.0.0.1': {}
|
||||
'::1': {}
|
||||
'localhost': {}
|
||||
asserts:
|
||||
- "hasattr(SAM._connection, 'ismock')"
|
||||
- "SAM._connection.transport == 'ssh'"
|
||||
- "self._play_context.shell == None"
|
||||
- "self.execute_called"
|
||||
- "self.final_module_args['_local_rsync_path'] == 'rsync'"
|
||||
- "self.final_module_args['src'] == '/tmp/deleteme'"
|
||||
- "self.final_module_args['dest'] == 'root@el6host:/tmp/deleteme'"
|
||||
- "self.final_module_args['private_key'] == '~/.ssh/id_rsa'"
|
@ -0,0 +1,379 @@
|
||||
{
|
||||
"ansible_pipelining": false,
|
||||
"ansible_docker_extra_args": "",
|
||||
"ansible_scp_extra_args": "",
|
||||
"ansible_user": "root",
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_connection": "smart",
|
||||
"ansible_ssh_common_args": "",
|
||||
"environment": [],
|
||||
"inventory_hostname": "el6host",
|
||||
"vars": {
|
||||
"ansible_check_mode": false,
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_file": "inventory",
|
||||
"ansible_delegated_vars": {
|
||||
"u1404": {
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_file": "inventory",
|
||||
"vars": {
|
||||
"inventory_file": "inventory",
|
||||
"role_names": [],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"ansible_check_mode": false,
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"environment": [],
|
||||
"ansible_user": "root",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
},
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"ansible_host": "u1404",
|
||||
"environment": [],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"ansible_check_mode": false,
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"role_names": [],
|
||||
"ansible_port": null,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_user": "root"
|
||||
}
|
||||
},
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"role_names": [],
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"environment": [],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"hostvars": {
|
||||
"el6host": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
},
|
||||
"u1404": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_user": "root"
|
||||
},
|
||||
"ansible_accelerate_port": 5099,
|
||||
"roledir": null,
|
||||
"ansible_ssh_extra_args": "",
|
||||
"ansible_host": "u1404",
|
||||
"ansible_current_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"hostvars": {
|
||||
"el6host": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
},
|
||||
"u1404": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_ssh_pipelining": false,
|
||||
"inventory_file": "inventory",
|
||||
"ansible_delegated_vars": {
|
||||
"u1404": {
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_file": "inventory",
|
||||
"vars": {
|
||||
"ansible_check_mode": false,
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_file": "inventory",
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"environment": [],
|
||||
"ansible_user": "root",
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"role_names": []
|
||||
},
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"ansible_host": "u1404",
|
||||
"environment": [],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"ansible_check_mode": false,
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"role_names": [],
|
||||
"ansible_port": null,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_user": "root"
|
||||
}
|
||||
},
|
||||
"ansible_module_compression": "ZIP_DEFLATED",
|
||||
"ansible_failed_hosts": [],
|
||||
"ansible_check_mode": false,
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"ansible_host": "u1404",
|
||||
"ansible_shell_executable": "/bin/sh",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"role_names": [],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_sftp_extra_args": ""
|
||||
}
|
@ -0,0 +1,387 @@
|
||||
{
|
||||
"ansible_pipelining": false,
|
||||
"ansible_docker_extra_args": "",
|
||||
"ansible_scp_extra_args": "",
|
||||
"ansible_user": "root",
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_connection": "smart",
|
||||
"ansible_ssh_common_args": "",
|
||||
"environment": [],
|
||||
"inventory_hostname": "el6host",
|
||||
"vars": {
|
||||
"ansible_check_mode": false,
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_file": "inventory",
|
||||
"ansible_delegated_vars": {
|
||||
"u1404": {
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_file": "inventory",
|
||||
"vars": {
|
||||
"inventory_file": "inventory",
|
||||
"role_names": [],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"ansible_check_mode": false,
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"environment": [],
|
||||
"ansible_user": "root",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
},
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"ansible_host": "u1404",
|
||||
"environment": [],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"ansible_check_mode": false,
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"role_names": [],
|
||||
"ansible_port": null,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_user": "root"
|
||||
}
|
||||
},
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"role_names": [],
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"environment": [],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"hostvars": {
|
||||
"el6host": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404",
|
||||
"::1"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404",
|
||||
"::1"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
},
|
||||
"u1404": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404",
|
||||
"::1"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404",
|
||||
"::1"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_user": "root"
|
||||
},
|
||||
"ansible_accelerate_port": 5099,
|
||||
"roledir": null,
|
||||
"ansible_ssh_extra_args": "",
|
||||
"ansible_host": "u1404",
|
||||
"ansible_current_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"hostvars": {
|
||||
"el6host": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404",
|
||||
"::1"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404",
|
||||
"::1"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "el6host",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
},
|
||||
"u1404": {
|
||||
"inventory_file": "inventory",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404",
|
||||
"::1"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404",
|
||||
"::1"
|
||||
]
|
||||
},
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"ansible_check_mode": false,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_ssh_pipelining": false,
|
||||
"inventory_file": "inventory",
|
||||
"ansible_delegated_vars": {
|
||||
"u1404": {
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_file": "inventory",
|
||||
"vars": {
|
||||
"ansible_check_mode": false,
|
||||
"inventory_hostname": "u1404",
|
||||
"inventory_file": "inventory",
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"environment": [],
|
||||
"ansible_user": "root",
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"role_names": []
|
||||
},
|
||||
"inventory_hostname_short": "u1404",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"group_names": [
|
||||
"ungrouped"
|
||||
],
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"ansible_host": "u1404",
|
||||
"environment": [],
|
||||
"ansible_play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"ansible_check_mode": false,
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"role_names": [],
|
||||
"ansible_port": null,
|
||||
"ansible_version": {
|
||||
"major": 2,
|
||||
"full": "2.2.0",
|
||||
"string": "2.2.0",
|
||||
"minor": 2,
|
||||
"revision": 0
|
||||
},
|
||||
"ansible_user": "root"
|
||||
}
|
||||
},
|
||||
"ansible_module_compression": "ZIP_DEFLATED",
|
||||
"ansible_failed_hosts": [],
|
||||
"ansible_check_mode": false,
|
||||
"groups": {
|
||||
"ungrouped": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
],
|
||||
"all": [
|
||||
"el6host",
|
||||
"u1404"
|
||||
]
|
||||
},
|
||||
"ansible_host": "u1404",
|
||||
"ansible_shell_executable": "/bin/sh",
|
||||
"inventory_hostname_short": "el6host",
|
||||
"omit": "__omit_place_holder__2433ce0463ffd13b68850ce9cdd98a1cde088e22",
|
||||
"inventory_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"playbook_dir": "/home/jtanner/workspace/issues/AP-15905",
|
||||
"ansible_user": "root",
|
||||
"role_names": [],
|
||||
"play_hosts": [
|
||||
"el6host"
|
||||
],
|
||||
"ansible_sftp_extra_args": ""
|
||||
}
|
@ -0,0 +1,285 @@
|
||||
from __future__ import absolute_import, division, print_function
|
||||
|
||||
__metaclass__ = type
|
||||
|
||||
'''
|
||||
(Epdb) pprint(DeepDiff(self.final_task_vars, out_task_vars), indent=2)
|
||||
{ 'dic_item_added': set([u"root['ansible_python_interpreter']"]),
|
||||
'dic_item_removed': set([ u"root['hostvars']['127.0.0.1']",
|
||||
u"root['hostvars']['::1']",
|
||||
u"root['hostvars']['localhost']"]),
|
||||
'iterable_item_added': { u"root['hostvars']['el6host']['groups']['all'][1]": u'::1',
|
||||
u"root['hostvars']['el6host']['groups']['ungrouped'][1]": u'::1',
|
||||
u"root['vars']['hostvars']['el6host']['groups']['all'][1]": u'::1',
|
||||
u"root['vars']['hostvars']['el6host']['groups']['ungrouped'][1]": u'::1'}}
|
||||
'''
|
||||
|
||||
import json
|
||||
import os
|
||||
import unittest
|
||||
import yaml
|
||||
|
||||
from ansible_collections.ansible.posix.tests.unit.compat.mock import patch, MagicMock
|
||||
from ansible_collections.ansible.posix.plugins.action.synchronize import ActionModule
|
||||
|
||||
|
||||
# Getting the incoming and outgoing task vars from the plugin's run method
|
||||
|
||||
'''
|
||||
import copy
|
||||
safe_vars = {}
|
||||
for k,v in task_vars.items():
|
||||
if k not in ['vars', 'hostvars']:
|
||||
safe_vars[k] = copy.deepcopy(v)
|
||||
else:
|
||||
sdata = str(v)
|
||||
newv = eval(sdata)
|
||||
safe_vars[k] = newv
|
||||
|
||||
import json
|
||||
with open('task_vars.json', 'wb') as f:
|
||||
f.write(json.dumps(safe_vars, indent=2))
|
||||
'''
|
||||
|
||||
|
||||
class BreakPoint(Exception):
|
||||
pass
|
||||
|
||||
|
||||
class TaskMock(object):
|
||||
args = {'src': u'/tmp/deleteme',
|
||||
'dest': '/tmp/deleteme',
|
||||
'rsync_path': 'rsync'}
|
||||
async_val = None
|
||||
become = None
|
||||
become_user = None
|
||||
become_method = None
|
||||
check_mode = False
|
||||
|
||||
|
||||
class StdinMock(object):
|
||||
shell = None
|
||||
|
||||
|
||||
class ConnectionMock(object):
|
||||
ismock = True
|
||||
_play_context = None
|
||||
# transport = 'ssh'
|
||||
transport = None
|
||||
_new_stdin = StdinMock()
|
||||
|
||||
get_option = MagicMock(return_value='root')
|
||||
|
||||
# my shell
|
||||
_shell = MagicMock()
|
||||
_shell.mkdtemp.return_value = 'mkdir command'
|
||||
_shell.join_path.side_effect = os.path.join
|
||||
_shell.get_option = MagicMock(return_value=['root', 'toor'])
|
||||
|
||||
|
||||
class PlayContextMock(object):
|
||||
shell = None
|
||||
private_key_file = None
|
||||
become = False
|
||||
become_user = 'root'
|
||||
become_method = None
|
||||
check_mode = False
|
||||
no_log = None
|
||||
diff = None
|
||||
remote_addr = None
|
||||
remote_user = None
|
||||
password = None
|
||||
|
||||
|
||||
class ModuleLoaderMock(object):
|
||||
def find_plugin(self, module_name, mod_type):
|
||||
pass
|
||||
|
||||
|
||||
class SharedLoaderMock(object):
|
||||
module_loader = ModuleLoaderMock()
|
||||
|
||||
|
||||
class SynchronizeTester(object):
|
||||
|
||||
''' A wrapper for mocking out synchronize environments '''
|
||||
|
||||
task = TaskMock()
|
||||
connection = ConnectionMock()
|
||||
_play_context = PlayContextMock()
|
||||
loader = None
|
||||
templar = None
|
||||
shared_loader_obj = SharedLoaderMock()
|
||||
|
||||
final_task_vars = None
|
||||
execute_called = False
|
||||
|
||||
def _execute_module(self, module_name, module_args=None, task_vars=None):
|
||||
self.execute_called = True
|
||||
self.final_module_args = module_args
|
||||
self.final_task_vars = task_vars
|
||||
return {}
|
||||
|
||||
def runtest(self, fixturepath='fixtures/synchronize/basic'):
|
||||
|
||||
metapath = os.path.join(fixturepath, 'meta.yaml')
|
||||
with open(metapath, 'rb') as f:
|
||||
fdata = f.read()
|
||||
test_meta = yaml.safe_load(fdata)
|
||||
|
||||
# load initial play context vars
|
||||
if '_play_context' in test_meta:
|
||||
if test_meta['_play_context']:
|
||||
self.task.args = {}
|
||||
for (k, v) in test_meta['_play_context'].items():
|
||||
if v == 'None':
|
||||
v = None
|
||||
setattr(self._play_context, k, v)
|
||||
|
||||
# load initial task context vars
|
||||
if '_task' in test_meta:
|
||||
if test_meta['_task']:
|
||||
self.task.args = {}
|
||||
for (k, v) in test_meta['_task'].items():
|
||||
# import epdb; epdb.st()
|
||||
if v == 'None':
|
||||
v = None
|
||||
setattr(self.task, k, v)
|
||||
|
||||
# load initial task vars
|
||||
if 'task_args' in test_meta:
|
||||
if test_meta['task_args']:
|
||||
self.task.args = {}
|
||||
for (k, v) in test_meta['task_args'].items():
|
||||
self.task.args[k] = v
|
||||
|
||||
# load initial task vars
|
||||
invarspath = os.path.join(fixturepath, test_meta.get('fixtures', {}).get('taskvars_in', 'taskvars_in.json'))
|
||||
with open(invarspath, 'rb') as f:
|
||||
fdata = f.read()
|
||||
fdata = fdata.decode("utf-8")
|
||||
in_task_vars = json.loads(fdata)
|
||||
|
||||
# load expected final task vars
|
||||
outvarspath = os.path.join(fixturepath, test_meta.get('fixtures', {}).get('taskvars_out', 'taskvars_out.json'))
|
||||
with open(outvarspath, 'rb') as f:
|
||||
fdata = f.read()
|
||||
fdata = fdata.decode("utf-8")
|
||||
out_task_vars = json.loads(fdata)
|
||||
|
||||
# fixup the connection
|
||||
for (k, v) in test_meta['connection'].items():
|
||||
setattr(self.connection, k, v)
|
||||
|
||||
# fixup the hostvars
|
||||
if test_meta['hostvars']:
|
||||
for (k, v) in test_meta['hostvars'].items():
|
||||
in_task_vars['hostvars'][k] = v
|
||||
|
||||
# initialize and run the module
|
||||
SAM = ActionModule(self.task, self.connection, self._play_context,
|
||||
self.loader, self.templar, self.shared_loader_obj)
|
||||
SAM._execute_module = self._execute_module
|
||||
result = SAM.run(task_vars=in_task_vars)
|
||||
|
||||
# run assertions
|
||||
for check in test_meta['asserts']:
|
||||
value = eval(check)
|
||||
# if not value:
|
||||
# print(check, value)
|
||||
# import epdb; epdb.st()
|
||||
assert value, check
|
||||
|
||||
|
||||
class FakePluginLoader(object):
|
||||
mocked = True
|
||||
|
||||
@staticmethod
|
||||
def get(transport, play_context, new_stdin):
|
||||
conn = ConnectionMock()
|
||||
conn.transport = transport
|
||||
conn._play_context = play_context
|
||||
conn._new_stdin = new_stdin
|
||||
return conn
|
||||
|
||||
|
||||
class TestSynchronizeAction(unittest.TestCase):
|
||||
|
||||
fixturedir = os.path.dirname(__file__)
|
||||
fixturedir = os.path.join(fixturedir, 'fixtures', 'synchronize')
|
||||
# print(basedir)
|
||||
|
||||
@patch('ansible_collections.ansible.posix.plugins.action.synchronize.connection_loader', FakePluginLoader)
|
||||
def test_basic(self):
|
||||
x = SynchronizeTester()
|
||||
x.runtest(fixturepath=os.path.join(self.fixturedir, 'basic'))
|
||||
|
||||
@patch('ansible_collections.ansible.posix.plugins.action.synchronize.connection_loader', FakePluginLoader)
|
||||
def test_basic_become(self):
|
||||
x = SynchronizeTester()
|
||||
x.runtest(fixturepath=os.path.join(self.fixturedir, 'basic_become'))
|
||||
|
||||
@patch('ansible_collections.ansible.posix.plugins.action.synchronize.connection_loader', FakePluginLoader)
|
||||
def test_basic_become_cli(self):
|
||||
# --become on the cli sets _play_context.become
|
||||
x = SynchronizeTester()
|
||||
x.runtest(fixturepath=os.path.join(self.fixturedir, 'basic_become_cli'))
|
||||
|
||||
@patch('ansible_collections.ansible.posix.plugins.action.synchronize.connection_loader', FakePluginLoader)
|
||||
def test_basic_vagrant(self):
|
||||
# simple vagrant example
|
||||
x = SynchronizeTester()
|
||||
x.runtest(fixturepath=os.path.join(self.fixturedir, 'basic_vagrant'))
|
||||
|
||||
@patch('ansible_collections.ansible.posix.plugins.action.synchronize.connection_loader', FakePluginLoader)
|
||||
def test_basic_vagrant_sudo(self):
|
||||
# vagrant plus sudo
|
||||
x = SynchronizeTester()
|
||||
x.runtest(fixturepath=os.path.join(self.fixturedir, 'basic_vagrant_sudo'))
|
||||
|
||||
@patch('ansible_collections.ansible.posix.plugins.action.synchronize.connection_loader', FakePluginLoader)
|
||||
def test_basic_vagrant_become_cli(self):
|
||||
# vagrant plus sudo
|
||||
x = SynchronizeTester()
|
||||
x.runtest(fixturepath=os.path.join(self.fixturedir, 'basic_vagrant_become_cli'))
|
||||
|
||||
@patch('ansible_collections.ansible.posix.plugins.action.synchronize.connection_loader', FakePluginLoader)
|
||||
def test_delegate_remote(self):
|
||||
# delegate to other remote host
|
||||
x = SynchronizeTester()
|
||||
x.runtest(fixturepath=os.path.join(self.fixturedir, 'delegate_remote'))
|
||||
|
||||
@patch('ansible_collections.ansible.posix.plugins.action.synchronize.connection_loader', FakePluginLoader)
|
||||
def test_delegate_remote_su(self):
|
||||
# delegate to other remote host with su enabled
|
||||
x = SynchronizeTester()
|
||||
x.runtest(fixturepath=os.path.join(self.fixturedir, 'delegate_remote_su'))
|
||||
|
||||
@patch('ansible_collections.ansible.posix.plugins.action.synchronize.connection_loader', FakePluginLoader)
|
||||
def test_basic_with_private_key(self):
|
||||
x = SynchronizeTester()
|
||||
x.runtest(fixturepath=os.path.join(self.fixturedir, 'basic_with_private_key'))
|
||||
|
||||
@patch('ansible_collections.ansible.posix.plugins.action.synchronize.connection_loader', FakePluginLoader)
|
||||
def test_delegate_remote_with_private_key(self):
|
||||
# delegate to other remote host and use the module param private_key
|
||||
x = SynchronizeTester()
|
||||
x.runtest(fixturepath=os.path.join(self.fixturedir, 'delegate_remote_with_private_key'))
|
||||
|
||||
@patch('ansible_collections.ansible.posix.plugins.action.synchronize.connection_loader', FakePluginLoader)
|
||||
def test_delegate_remote_play_context_private_key(self):
|
||||
# delegate to other remote host and use the play context private_key
|
||||
x = SynchronizeTester()
|
||||
x.runtest(fixturepath=os.path.join(self.fixturedir, 'delegate_remote_play_context_private_key'))
|
||||
|
||||
@patch.object(ActionModule, '_low_level_execute_command', side_effect=BreakPoint)
|
||||
@patch.object(ActionModule, '_remote_expand_user', side_effect=ActionModule._remote_expand_user, autospec=True)
|
||||
def test_remote_user_not_in_local_tmpdir(self, spy_remote_expand_user, ll_ec):
|
||||
x = SynchronizeTester()
|
||||
SAM = ActionModule(x.task, x.connection, x._play_context,
|
||||
x.loader, x.templar, x.shared_loader_obj)
|
||||
try:
|
||||
SAM.run(task_vars={'hostvars': {'foo': {}, 'localhost': {}}, 'inventory_hostname': 'foo'})
|
||||
except BreakPoint:
|
||||
pass
|
||||
self.assertEqual(spy_remote_expand_user.call_count, 0)
|
@ -0,0 +1,42 @@
|
||||
boto3
|
||||
placebo
|
||||
pycrypto
|
||||
passlib
|
||||
pypsrp
|
||||
python-memcached
|
||||
pytz
|
||||
pyvmomi
|
||||
redis
|
||||
requests
|
||||
setuptools > 0.6 # pytest-xdist installed via requirements does not work with very old setuptools (sanity_ok)
|
||||
unittest2 ; python_version < '2.7'
|
||||
importlib ; python_version < '2.7'
|
||||
netaddr
|
||||
ipaddress
|
||||
netapp-lib
|
||||
solidfire-sdk-python
|
||||
|
||||
# requirements for F5 specific modules
|
||||
f5-sdk ; python_version >= '2.7'
|
||||
f5-icontrol-rest ; python_version >= '2.7'
|
||||
deepdiff
|
||||
|
||||
# requirement for Fortinet specific modules
|
||||
pyFMG
|
||||
|
||||
# requirement for aci_rest module
|
||||
xmljson
|
||||
|
||||
# requirement for winrm connection plugin tests
|
||||
pexpect
|
||||
|
||||
# requirement for the linode module
|
||||
linode-python # APIv3
|
||||
linode_api4 ; python_version > '2.6' # APIv4
|
||||
|
||||
# requirement for the gitlab module
|
||||
python-gitlab
|
||||
httmock
|
||||
|
||||
# requirment for kubevirt modules
|
||||
openshift ; python_version >= '2.7'
|
Reference in New Issue
Block a user