5 ms·
Love using Ansible (though I don't always love writing YAML). PROTIP: I use it to manage my laptops/workstations with a hosts entry like: [laptop-thinkpad]
by tbran 6y ago
Love using Ansible (though I don't always love writing YAML).
PROTIP: I use it to manage my laptops/workstations with a hosts entry like:
[laptop-thinkpad]
localhost ansible_connection=local
Sometimes I think it's overkill, but the config files are a little easier to visually parse.
- INTPenis 6y agoDeprecated 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.
- apple4ever 6y agoThat deprecation was deprecated :)
- INTPenis 6y agoNo way, you're kidding!
- l-p 6y agoFirst 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.
- Spivak 6y agoAnother 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=bash