-
-
Save bradparker/b1c07d9ec439d30739d7dec32d1feee9 to your computer and use it in GitHub Desktop.
Ansible shell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TASK [Find or create a linode] ********************************************************************************************************************************************************************************************************* | |
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ModuleNotFoundError: No module named 'linode_api4' | |
failed: [localhost] (item=27) => {"ansible_loop_var": "item", "changed": false, "item": "27", "msg": "Failed to import the required Python library (linode-api4) on FGFMAC66.local's Python /nix/store/51ly5wgcjmv9g23156kjsd4x9m102zxf-python3-3.7.8/bin/python3. Please read module documentation and install in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let | |
nixpkgs = | |
import (builtins.fetchTarball { | |
url = https://releases.nixos.org/nixpkgs/nixpkgs-20.09pre242401.ebd2e632d61/nixexprs.tar.xz; | |
}) {}; | |
linode_api4 = | |
{ | |
buildPythonPackage, | |
fetchPypi, | |
requests, | |
future, | |
}: | |
buildPythonPackage rec { | |
pname = "linode_api4"; | |
version = "2.3.5"; | |
propagatedBuildInputs = [ requests future ]; | |
src = fetchPypi { | |
inherit pname version; | |
sha256 = "0n28420r3n6f716ghsx46dn3v5c90fv1cydn884q3cb5qnmrn3zr"; | |
}; | |
doCheck = false; | |
}; | |
python37 = nixpkgs.python37.withPackages (packages: | |
with packages; [ | |
ansible | |
(callPackage linode_api4 {}) | |
] | |
); | |
in | |
nixpkgs.stdenv.mkDerivation { | |
pname = "infrastructure"; | |
version = "1.0.0"; | |
buildInputs = with nixpkgs; [ | |
python37 | |
]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment