13 February, 2023
Ansible in an hour
I stumbled upon a nice server automation course made by an expert I follow. I don’t do many tedious, repeatable tasks in my daily work, but I wanted to prepare for future.
Ansible is useful for bulk server configuration, application deployment, and other automation tasks. The course I finished is very compact, but it explains the most important topics:
- Prepping Ansible for use (installation, management node, inventories)
- Ad-hoc modules (running commands on all servers)
- YAML configs (playbooks)
- Facts, variables
- Playbook creation (generating SSH keys, using variables, loops, groups, creating users, conditionals, file operations, tags, templates, firewall config)
- External roles (using playbooks from Ansible Galaxy, Docker containers)
- Creating own roles (complete web server setup example)
- Ansible Lint (config validation)
- Ansible Dynamic Inventory (useful for large server farms)
- Ansible Vault (credentials storage)
- Ansible AWX (free counterpart of Ansible Tower; a web interface for playbook management)
Looks like a quite useful, pretty complex tool. Sadly, most of the Linux servers I use are handled by Laravel ecosystem tools, so I might need to wait a while before putting Ansible to use.