Trying to automatically/programmatically replicate #DockerCompose stacks on the same host. E.g. I have an application that requires multiple containers, and I want to replicate the WHOLE application with its own volumes, networks, subdomain, etc. Any pointers on how to do that? #Ansible? Please don't say #Kubernetes.
Does anyone have a simple idea of using a gopass output as an #ansible vault instead of just as the password TO a vault.
So i'd like to put all variable settings e.g. a yaml into my gopass and include it instead of putting vaults into git repos.
I fail to find a (compatible) way of including variables from script output, or using an external vault application in ansible.
I already use a gopass script to fetch the vaults password, but i feel its a bit clumpsy to maintain a vault in the ansible git, and maintain the vault password in the gopass git.
@jpmens gopass is basically a git/gpg command line based vault. Possible team password management. You can store arbitrary files in there although thought as a keepass similar password manager.
Got it to work with 10 lines of python in a vars plugin.
New customer using user logins + sudo and i am not going to type my sudo password over and over again using their ansible stuff.
My sudo password is in my gopass, and ansible may access it.
Segfault when running the #Ansible apt module to remove wifi and Bluetooth related packages on my raspberry pi. But no problem using the equivalent apt commands. That's weird.
Anyway, this raspberry pi ("pilote") needs to be upgraded (Debian 10 to 12). A perfect time to install it from scratch and use Ansible.
As promised in my talk at #SCaLE, I've done a big refacto of this repository to publish it on github. Soon™ 🤞🏻
There's an interesting discussion happening in the #Ansible forum that we'd like you all to participate in, regarding the future of the Ansible community package (aka what you get if you pip install ansible).
I find it annoying that #ansible#awx is installed using an operator. What are people doing that they would adding or removing AWX instances so that an operator makes sense vs a normal Helm based workflow? What am I missing?
Had to change the config, now I wait for Ansible to run again. I swear to you all I started using Kube and avoiding Ansible for this very reason. #ansible#awx
I really wish #ansible module devs would make up their minds about how to pass stuff to it. So like the packages module? Pass it a list of packages, super easy
ansible.builtin.packages:
foo
bar
baz
state: present
But say you want to create a bunch of directories? Well, sucks for you - the file module doesn't work that way:
ansible.builtin.file:
path: "{{item}}"
owner: larted
group: luser
mode: "0755"
state: directory
with_items:
"/haha"
"/fuck"
"/consistency"
And these are both BUILTIN modules. Seriously folks, make up your fucking minds. Shit like this makes being a #sysadmin pointlessly difficult.
Ansible.builtin.packages installs all the packages in one invocation. I.e. it's the equivalent of apt-get install foo bar baz.
Your example with ansible.builtin.file is using a loop construct iterating over a list of directories to create them one by one. The with_items is generic feature of Ansible and not something the file module is implementing. You could do the same when installing packages.
The problem that I have is that if I follow the recommendation and convert the tasks to handlers, then the handlers will be very far away in the playbook - way down at the bottom, hundreds of lines later.
I can silence the error, but I guess it is there for a reason.
Am I crazy? Or is the idea that I should be having smaller playbooks or what?
@ascherbaum Well I basically have a playbook that sets up everything on a metal server in a cluster. So installing packages, configuring email, creating swap, changing from systemd timesync to ntpd and so on. It's a lot of simple things. I guess that I can split it up, but have never had any reason to... until now, and it feels a bit arbitrary. 🤔