1{ lib 2, buildPythonPackage 3, fetchPypi 4, psutil 5, pexpect 6, python-daemon 7, pyyaml 8, six 9, stdenv 10, ansible 11, mock 12, openssh 13, pytest-mock 14, pytest-timeout 15, pytest-xdist 16, pytestCheckHook 17}: 18 19buildPythonPackage rec { 20 pname = "ansible-runner"; 21 version = "2.0.3"; 22 23 src = fetchPypi { 24 inherit pname version; 25 sha256 = "15j0ljgw1rjxq4xiywxxxnxj4r6vwk8dwljkdsjmq3qmwgifcswg"; 26 }; 27 28 checkInputs = [ 29 ansible # required to place ansible CLI onto the PATH in tests 30 pytestCheckHook 31 pytest-mock 32 pytest-timeout 33 pytest-xdist 34 mock 35 openssh 36 ]; 37 38 propagatedBuildInputs = [ 39 ansible 40 psutil 41 pexpect 42 python-daemon 43 pyyaml 44 six 45 ]; 46 47 preCheck = '' 48 export HOME=$(mktemp -d) 49 ''; 50 51 disabledTests = [ 52 "test_callback_plugin_task_args_leak" # requires internet 53 "test_env_accuracy" 54 "test_large_stdout_blob" # times out on slower hardware 55 ] 56 # test_process_isolation_settings is currently broken on Darwin Catalina 57 # https://github.com/ansible/ansible-runner/issues/413 58 ++ lib.optional stdenv.isDarwin "process_isolation_settings"; 59 60 disabledTestPaths = [ 61 # these tests unset PATH and then run executables like `bash` (see https://github.com/ansible/ansible-runner/pull/918) 62 "test/integration/test_runner.py" 63 "test/unit/test_runner.py" 64 ] 65 ++ lib.optionals stdenv.isDarwin [ 66 # integration tests on Darwin are not regularly passing in ansible-runner's own CI 67 "test/integration" 68 # these tests write to `/tmp` which is not writable on Darwin 69 "test/unit/config/test__base.py" 70 ]; 71 72 meta = with lib; { 73 description = "Helps when interfacing with Ansible"; 74 homepage = "https://github.com/ansible/ansible-runner"; 75 license = licenses.asl20; 76 maintainers = [ maintainers.costrouc ]; 77 }; 78}