digitalcourage.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
Diese Instanz wird betrieben von Digitalcourage e.V. für die Allgemeinheit. Damit wir das nachhaltig tun können, erheben wir einen jährlichen Vorausbeitrag von 1€/Monat per SEPA-Lastschrifteinzug.

Server stats:

857
active users

Fun question for the bubble:

I noticed that Ansible on NixOS does not find python modules that have been installed from NixPkgs. This means, modules like the kubernetes module are not found and Ansible cannot do its work, when a task is executed on localhost (e.g. via delegate_to)

Is there a way to install those additional modules together with the Ansible package?

Or is this just some messup with autodetecting the python interpreter on localhost?

@johanneskastl There's such a bubble? I'd love to ask some questions about using Ansible on NixOS, first and foremost: why?

It seems redundant at best, and mutually exclusive at worst.

And I don't mean to be aggressive with that question, I am genuinely curious of the use case.

Johannes Kastl

@maxxieb (1/2)
I had to refrain from calling "Bingo", because I had anticipated that question. But it is an obvious question that deserves an answer. I also had to stop myself from quoting Shakespeare ("There more things ...").

In my case it boils down to this:
1. I have been experimenting with using on my laptop, where I do all of my (private) things. I also have home-manager on my work laptop.
I can almost do all of the things I can on my laptop. This includes packaging for openSUSE.

But I have not converted all of my 3 dozen different VMs, servers, raspis, NUCs and whatnot to NixOS. They will keep running a mixture of immutable (openSUSE , , NixOS, ...) and non-immutable things (Debian, Proxmox, ...). And I would like to be able to manage them from whatever host I am currently working from. Hence I would like to have a working Ansible environment on my NixOS laptop to manage other machines with.

@maxxieb (2/2)

2. In addition, I heavily use vagrant and Ansible in combination (or OpenTofu/Terraform and Ansible) for demo setups, testing out things, PoCs. This allows me to share those setups with anyone interested, the only things they need are vagrant-libvirt and Ansible. Especially for coworkers and new colleagues this is a really low hurdle.
Converting all of those setups to be based on NixOS is not on my bucket list.

I hope this explains my background a little...

@johanneskastl @maxxieb
Our servers at work are still Ubuntu systems managed with Ansible.
However for our developer setup fully migrated away from Vagrant to a Nix based setup + Ansible.

We have way less problems since we did that.
In addition the setup is a lot faster.
Ansible configures Nginx site configs, application, etc. while Nix brings in the packages and sets up the environment.

Of course it depends on your use case, especially for Terraform demos where you configure VMs Vagrant makes more sense of course.

@johanneskastl sure, that looks like fully legit use case. Although I personally think that Nix shines in demo/PoC/i need to share it with someone with minimal hassle space. (also big respect for CoreOS, I loved that thing)

Although for non-nixos hosts there is always an option: github.com/numtide/system-mana

GitHubGitHub - numtide/system-manager: Manage system config using nix on any distroManage system config using nix on any distro. Contribute to numtide/system-manager development by creating an account on GitHub.