Johannes Kastl<p>Third round for the <a href="https://digitalcourage.social/tags/NixOS" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>NixOS</span></a> <a href="https://digitalcourage.social/tags/Ansible" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Ansible</span></a> bubble:</p><p>I think I have a solution! At least I got some thing working.</p><p>Having the python312 nixpkg installed is not enough. It is also not enough to have python312, python312Packages.kubernetes and python312Packages.cryptography installed.</p><p>I had to install them "in the same package":</p><p>```<br> home.packages = with pkgs; [<br> ansible<br> ansible-lint<br> (pkgs.python3.withPackages (python-pkgs: [<br> python-pkgs.cryptography<br> python-pkgs.kubernetes<br> ]))<br> ];<br>```</p><p>Then I could set the ansible_python_interpreter to `python3` and could use the kubernetes python module for using things from the kubernetes.core Ansible collection.</p><p>This is in addition to having the modules also available in the ansible derivation, no idea if that is really necessary.</p><p>I'll do some more digging and testing, but at least something worked now! I call that a win!</p><p># NixOS <a href="https://digitalcourage.social/tags/Ansible" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Ansible</span></a> <a href="https://digitalcourage.social/tags/Python" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Python</span></a> <a href="https://digitalcourage.social/tags/hellyeah" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>hellyeah</span></a></p>