Warning: using includes is a bad idea. If you can unroll loop statically, do it statically. Include is a last ‘hope’ for situations when you no longer have other options.
Forgot ‘fetch’, or ‘slurp’. Both are terrible to use. With big efforts I realized that synchronize CAN synchronize remote directory INTO local (on the controller).
synchronize
Today I’m investigating an odd circular dependency in systemd units in openstack-ansible. One of the units under investigation implements a really interesting way to run database checks. I decided to dig deeper to better understand that technique.
There is a way to control ‘mothership’ systemd (including reboot and starting/stopping services).
There is an idea that passing secrets via environment variables is more safe, than passing it via command line.
Ansible has few methods to accept password:
There is an unsolved issue of remove_host module for Ansible. There is add_host module, which allows you to add host into a group dynamically (or even…
remove_host
add_host
__init__.py
At recent code review my colleague pointed out to a lot of code inside __init__.py. I looked at those things with fresh eye and found, that many things I…
This little python trick works great in Ansible.
Let’s say you want to set foo to value of the bar, but only if bar is not empty. If bar is empty, you want to use other value (f.e. string “nothing”).
I was really upset when I realized that an Ansible iptables module does not support creation of custom chains. Initially I’ve assumed they’re going to be creates automatically, as soon as I added a single rule into a new chain. Nope.
iptables
This topic I really don’t like. There are so many entities in priority list (places to put variables) that it’s impossible to remember. Moreover, it’s impossible to recognize.