Posts

Showing posts with the label ansible

Managing my Debian Systems with Ansible

Image
Years ago, as a DevOps engineer, I managed systems using various automation tools. However, for managing my own workstations, I chose Ansible and found a streamlined way to keep my Debian systems consistent without turning the whole exercise into another full-time job. What I like most about Ansible in this context is that it gives me structure without much friction. I can keep a clear separation between work and home machines; I can decide exactly which roles belong on which hosts through the inventory ; and I get useful safeguards such as ansible-lint and dry runs before I touch a live system. I also find the tooling approachable. The command line is simple, the module ecosystem is broad, and the documentation is good enough that I rarely feel like I am fighting the tool. The project itself is organised around small, isolated roles. Each role lives in its own directory under roles/ , with its own tasks, files, and variables, so a change to something like vim does not leak i...

Automation with Ansible

Ansible is a Python based automation tool. I started using it to revert changes made on my local machine every time there were package updates. That is I wanted to ensure my options and settings were preserved. Professionally my team uses Puppet but we were looking at alternatives. Ansible was chosen for a variety of reasons: it is easy to learn, has broad functionality and an active community. There is next to no new lingo to learn: a task is an action you want to perform a list of tasks can be organised into a playbook handlers are special tasks that are triggered by a change in a task a group of playbooks is organised into roles an inventory is a list of hosts (or group of hosts) to apply a playbook to playbooks are under the roles directory tasks are stored in the tasks directory, under a role variables are stored in the vars directory, under a role templates are stored in templates directory, under a role So, any typical Ansible project would look something like: ...