2018-07-21 02:44:44 +02:00
|
|
|
{ stdenv, fetchurl, python2
|
2018-05-10 08:09:15 +02:00
|
|
|
, windowsSupport ? false
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
generic = { version, sha256, py ? python2 }: py.pkgs.buildPythonPackage rec {
|
|
|
|
pname = "ansible";
|
|
|
|
inherit version;
|
|
|
|
|
2018-08-13 15:30:41 +02:00
|
|
|
outputs = [ "out" "man" ];
|
|
|
|
|
2018-05-10 08:09:15 +02:00
|
|
|
src = fetchurl {
|
2018-06-28 20:43:35 +02:00
|
|
|
url = "https://releases.ansible.com/ansible/${pname}-${version}.tar.gz";
|
2018-05-10 08:09:15 +02:00
|
|
|
inherit sha256;
|
|
|
|
};
|
|
|
|
|
|
|
|
prePatch = ''
|
|
|
|
sed -i "s,/usr/,$out," lib/ansible/constants.py
|
|
|
|
'';
|
|
|
|
|
2018-08-13 15:30:41 +02:00
|
|
|
postInstall = ''
|
2018-09-28 10:20:30 +02:00
|
|
|
wrapPythonProgramsIn "$out/bin" "$out $PYTHONPATH"
|
|
|
|
|
2018-08-13 15:30:41 +02:00
|
|
|
for m in docs/man/man1/*; do
|
|
|
|
install -vD $m -t $man/share/man/man1
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2018-05-10 08:09:15 +02:00
|
|
|
doCheck = false;
|
|
|
|
dontStrip = true;
|
|
|
|
dontPatchELF = true;
|
|
|
|
dontPatchShebangs = false;
|
|
|
|
|
|
|
|
propagatedBuildInputs = with py.pkgs; [
|
2018-09-28 10:20:30 +02:00
|
|
|
pycrypto paramiko jinja2 pyyaml httplib2 boto six netaddr dnspython jmespath dopy
|
2018-05-10 08:09:15 +02:00
|
|
|
] ++ stdenv.lib.optional windowsSupport pywinrm;
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = http://www.ansible.com;
|
|
|
|
description = "A simple automation tool";
|
|
|
|
license = with licenses; [ gpl3 ] ;
|
|
|
|
maintainers = with maintainers; [ jgeerds joamaki ];
|
|
|
|
platforms = with platforms; linux ++ darwin;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
in rec {
|
|
|
|
# We will carry all the supported versions
|
|
|
|
|
|
|
|
ansible_2_4 = generic {
|
|
|
|
version = "2.4.4.0";
|
|
|
|
sha256 = "0n1k6h0h6av74nw8vq98fmh6q4pq6brpwmx45282vh3bkdmpa0ib";
|
|
|
|
};
|
|
|
|
|
|
|
|
ansible_2_5 = generic {
|
2018-11-02 23:16:07 +01:00
|
|
|
version = "2.5.11";
|
|
|
|
sha256 = "07rhgkl3a2ba59rqh9pyz1p661gc389shlwa2sw1m6wwifg4lm24";
|
2018-05-10 08:09:15 +02:00
|
|
|
};
|
|
|
|
|
2018-08-09 08:19:55 +02:00
|
|
|
ansible_2_6 = generic {
|
2018-11-02 23:18:57 +01:00
|
|
|
version = "2.6.7";
|
|
|
|
sha256 = "10pakw9k9wd3cy1qk3ah2253ph7c7h3qzpal4k0s5lschzgy2fh0";
|
2018-08-09 08:19:55 +02:00
|
|
|
};
|
|
|
|
|
2018-11-02 23:21:53 +01:00
|
|
|
ansible_2_7 = generic {
|
2018-11-20 02:21:37 +01:00
|
|
|
version = "2.7.2";
|
|
|
|
sha256 = "1q0yxba57m18rfpc3syvj7vyqsb35081h6s33qr6h0jf3r9pj3d0";
|
2018-11-02 23:21:53 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
ansible2 = ansible_2_7;
|
2018-05-10 08:09:15 +02:00
|
|
|
ansible = ansible2;
|
|
|
|
}
|