Merge "Always write ansible-playbook-command.sh"
This commit is contained in:
commit
77edee9651
@ -217,6 +217,9 @@ class FakeRunnerConfig(object):
|
||||
env = dict() # noqa
|
||||
artifact_dir = ''
|
||||
|
||||
def __init__(self):
|
||||
self.command = []
|
||||
|
||||
def prepare(self):
|
||||
pass
|
||||
|
||||
|
@ -206,10 +206,12 @@ class TestRunAnsiblePlaybook(TestCase):
|
||||
extra_vars=arglist
|
||||
)
|
||||
|
||||
@mock.patch('os.chmod')
|
||||
@mock.patch('six.moves.builtins.open')
|
||||
@mock.patch('tripleoclient.utils.makedirs')
|
||||
@mock.patch('os.path.exists', side_effect=(False, True, True))
|
||||
def test_run_with_timeout(self, mock_exists, mock_mkdir, mock_open):
|
||||
def test_run_with_timeout(self, mock_exists, mock_mkdir, mock_open,
|
||||
mock_chmod):
|
||||
ansible_runner.ArtifactLoader = mock.MagicMock()
|
||||
ansible_runner.Runner.run = mock.MagicMock(return_value=('', 0))
|
||||
ansible_runner.runner_config = mock.MagicMock()
|
||||
|
@ -252,7 +252,7 @@ def run_ansible_playbook(playbook, inventory, workdir, playbook_dir=None,
|
||||
parallel_run=False,
|
||||
callback_whitelist=constants.ANSIBLE_CWL,
|
||||
ansible_cfg=None, ansible_timeout=30,
|
||||
reproduce_command=False,
|
||||
reproduce_command=True,
|
||||
timeout=None, forks=None):
|
||||
"""Simple wrapper for ansible-playbook.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user