2019-02-24 22:06:53 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, psutil
|
|
|
|
, pexpect
|
|
|
|
, python-daemon
|
|
|
|
, pyyaml
|
|
|
|
, six
|
2020-02-19 03:42:40 +00:00
|
|
|
, stdenv
|
2019-02-24 22:06:53 +00:00
|
|
|
, ansible
|
|
|
|
, mock
|
2021-11-06 09:14:50 +00:00
|
|
|
, openssh
|
|
|
|
, pytest-mock
|
|
|
|
, pytest-timeout
|
|
|
|
, pytest-xdist
|
|
|
|
, pytestCheckHook
|
2019-02-24 22:06:53 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "ansible-runner";
|
2021-11-25 22:46:37 +00:00
|
|
|
version = "2.1.1";
|
2019-02-24 22:06:53 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-11-25 22:46:37 +00:00
|
|
|
sha256 = "7684612f7543c5f07f3e8135667eeb22a9dbd98f625cc69901ba9924329ef24f";
|
2019-02-24 22:06:53 +00:00
|
|
|
};
|
|
|
|
|
2021-11-06 09:14:50 +00:00
|
|
|
checkInputs = [
|
|
|
|
ansible # required to place ansible CLI onto the PATH in tests
|
|
|
|
pytestCheckHook
|
|
|
|
pytest-mock
|
|
|
|
pytest-timeout
|
|
|
|
pytest-xdist
|
|
|
|
mock
|
|
|
|
openssh
|
|
|
|
];
|
|
|
|
|
2019-02-24 22:06:53 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
ansible
|
|
|
|
psutil
|
|
|
|
pexpect
|
|
|
|
python-daemon
|
|
|
|
pyyaml
|
|
|
|
six
|
|
|
|
];
|
|
|
|
|
2021-11-06 09:14:50 +00:00
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d)
|
2019-02-24 22:06:53 +00:00
|
|
|
'';
|
|
|
|
|
2021-11-06 09:14:50 +00:00
|
|
|
disabledTests = [
|
|
|
|
"test_callback_plugin_task_args_leak" # requires internet
|
|
|
|
"test_env_accuracy"
|
|
|
|
"test_large_stdout_blob" # times out on slower hardware
|
|
|
|
]
|
|
|
|
# test_process_isolation_settings is currently broken on Darwin Catalina
|
|
|
|
# https://github.com/ansible/ansible-runner/issues/413
|
|
|
|
++ lib.optional stdenv.isDarwin "process_isolation_settings";
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# these tests unset PATH and then run executables like `bash` (see https://github.com/ansible/ansible-runner/pull/918)
|
|
|
|
"test/integration/test_runner.py"
|
|
|
|
"test/unit/test_runner.py"
|
|
|
|
]
|
|
|
|
++ lib.optionals stdenv.isDarwin [
|
|
|
|
# integration tests on Darwin are not regularly passing in ansible-runner's own CI
|
|
|
|
"test/integration"
|
|
|
|
# these tests write to `/tmp` which is not writable on Darwin
|
|
|
|
"test/unit/config/test__base.py"
|
|
|
|
];
|
|
|
|
|
2019-02-24 22:06:53 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Helps when interfacing with Ansible";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/ansible/ansible-runner";
|
2019-02-24 22:06:53 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = [ maintainers.costrouc ];
|
|
|
|
};
|
|
|
|
}
|