Another nice trick is to use your shebang line.
#!/usr/bin/env ansible-playbook
---
- hosts: localhost
connection: local
vars:
home: "{{ lookup('env', 'HOME') }}"
tasks:
# ...
So then it just becomes. pip install -r requirements.txt
./install --tags=bashDeprecated group name format. ;)
I started using Ansible when it was brand new, like 0.2 I believe. It changes so fast that I've had junior co-workers come in and teach me new best practices in Ansible.
Re:Ansible 2.10
by apple4ever on Friday August 14, 2020 @05:26PM
(#24163484)
That deprecation was deprecated :)
No way, you're kidding!
First I used debian packages and maintained a (multiarch!) repository to setup my computers, then I used Ansible and had to first install Python and SSH on every machine, now I just run a script and I'm done in a few minutes and very few manual steps.
I found Ansible for personal computers to be brittle and cumbersome as reinstalls are usually for OS upgrades and those tend to have breaking changes.
PROTIP: I use it to manage my laptops/workstations with a hosts entry like:
Sometimes I think it's overkill, but the config files are a little easier to visually parse.