Skip to content

Ansible Tips

Just a collection of things I’ve found useful for ansible/semaphore-ui

With semaphore-ui .ini files don’t work as a nested inventory. Have to use .yml

Semaphore using nested inventory create it as /inventory/xxx

Semaphore will pull in the ansible.cfg file and apply setting there

Some nice defaults are:

[defaults]
# This makes the console output look like a clean document
# rather than a giant JSON blob.
result_format=yaml
bin_ansible_callbacks = True
host_key_checking = False
interpreter_python = auto_silent

due to anticipated retirement of boltdb, I migrated to postgresql running in a docker container

Terminal window
semaphore migrate --from-boltdb /var/lib/semaphore/database.boltdb --merge-existing-users
Terminal window
docker exec POSTGRES_CONTAINER pg_dumpall -U POSTGRES_USER > /tmp/postgres_full_backup.sql