New answers tagged

1

Q: "How could I get it to fall back to Ansible's default for keys that don't exist?" A: Omit such parameters, e.g. create_home: "{{ item.create_home|default(omit) }}"


0

I think you can just include_vars at directory level with dir tasks: - name: "Read my pets from pets folder" include_vars: dir: "pets" name: all_pets


0

The githubixx wireguard ansible role might be what you are looking for. The author of the role says: I use WireGuard to setup a fully meshed VPN (every host can directly connect to every other host) and run my Kubernetes (K8s) cluster at Hetzner Cloud (but you should be able to use any hoster you want). So the important components like the K8s controller ...


0

Important: I needed to add the user for the cron job and put -b at the end of the ad hoc command for become. I'm off to debug more :-)


0

With a bit trial and error I was able to work out the values for my "vnet_id" and "snet_id" variables. I found using the full ID for the virtual network and not having a "/" before the subnet variable (snet_id) value fixed my problem. At the moment I don't fully understand how Ansible/Azure puts it all together, but this has ...


0

A gitlab runner is a process that f.e. tests, compiles your project, pushes the artefact to you artefact store etc. A Gitlab runner can be tagged inside Gitlab or via config.toml - so - you can assign runners via tags to Gitlab projects (shared). Gitlab runner are not designed to run an application 24x7. So - you assign a project to a runner (or a tag or all)...


1

pyinfra was designed for this purpose. Fabric can also be used to script configuration.


2

This afternoon I also struggled on this. I think I've understood it a little bit more so I'd like to share it. But I'm also new to Ansible Vault so what I say here may not be completely correct. I used [1] as my main source of learning. What May Have Confused You [1] says a vault ID has the pattern label@source. But the symbol @ delivers the meaning of "...


2

If you just want to print a subset of the results of your commands on your terminal without using one or more -v flags, you can refactor your playbook to show just the standard output from each of the commands using a JSON query. For example: --- - name: display info hosts: localhost tasks: - name: Display uptime and kernel info shell: "{{ ...


0

I've got an Ansible role that may help you. It was designed to act as a gateway, but I think it may still work for you (hopefully without having to tweak it). The most helpful aspect is that it can run in either client or server mode. So what you would do in your playbook: Run it on master in server mode, Save the generated public key to a variable. Loop ...


1

I think it should be: children: docker: hosts: 01-dev: 02-dev: (The colon)


Top 50 recent answers are included