5 ms·
I made something similar years ago, a long one-liner. tar cpf - provision/ | ssh ubuntu@192.168.1.99 "tar xpf - -C /tmp && cd /tmp/provision && bash /tmp/pro
by mariocesar 6mo ago
I made something similar years ago, a long one-liner.
tar cpf - provision/ | ssh ubuntu@192.168.1.99 "tar xpf - -C /tmp && cd /tmp/provision && bash /tmp/provision/bootstrap.sh && rm -rf /tmp/provision"
Heres is the full use: https://gist.github.com/mariocesar/8e674ec40dad6b94114d2a44d9151e23 https://gist.github.com/mariocesar/8e674ec40dad6b94114d2a44d...
I named "Ansible for the Frugal"
- wang_li 6mo agoAnsible only exists because of an influx of people who don't know how to do this.
- icedchai 6mo agoMany years ago I wrote my own "cloud instance bootstrapper" that would pull a tar off of S3 based on EC2 instance tags / metadata, untar it, then run a script. I never got into Ansible and I hated having to rebuild AMIs for minor changes.
- everforward 6mo agoAnsible exists because it makes things idempotent, which is great when you have to do a thing on 1,000 servers because you can just fix the role and re-run it. Bash can be idempotent but isn’t by default, so you either spend time making and idempotent bash script or you spend time learning Ansible to accomplish the same thing in a reusable way
- wang_li 6mo agoAnsible’s idempotency is dependent on the specific module being invoked. What ansible mainly brings to the table is the parameterized modules. Which brings us back to people adopting it because they don’t know how to compose one liners, quote them properly, and wrap them in a for loop.