chriscn / homelab

Documentation behind my homelab
0 stars 0 forks source link
ansible docker homelab raspberry-pi

homelab

design / overview

devices

ansible

There are some specific Ansible configuration choices that I have made.

inventories and hosts

If you have your group_vars and host_vars in the root directory, and the hosts file in a different directory, Ansible will not pick up the group_vars and host_vars files. This is because Ansible will look for the group_vars and host_vars in the same directory as the hosts file. This only appears when using playbooks in a different directory to the hosts file.

variable_naming

Variables that are used in roles, should prefix their role name, i.e. the role webserver is webserver_port.

Handlers should be named <role>::<action>. i.e. nginx::reload.

useful one-liners