4 ms·
Nothing beats my 400 lines bash code. :)
by chimen 6y ago
Nothing beats my 400 lines bash code. :)
- sgt 6y agoThat may be.. but imagine if you were in a team environment, and others started playing and modifying your wonderful bash code. It's almost a recipe for disaster, unless everyone is as disciplined as you are. With the declarative approach of Ansible, at least most things will be "guaranteed" to work.
- hellcow 6y agoIf people start modifying my Ansible scripts without discipline then it's going to be a disaster too. Code review is the key in both cases.
- inshadows 6y agoNonsense. There is no declarative approach in Ansible that's "guaranteed" to work. If Ansible is declarative then so is this Bash script mkdir -p /opt/app rsync -a src /opt/app
- swiley 6y agoI still don't understand why we can't just use bash (or some better language) and reject merge requests that don't have things split up into units that are either pure or who's side effects are idempotent.
- strzibny 6y agoExactly my thinking and what I teach in my book[0]. Things like setting up NGINX or systemd live in separate units and can be rerun (changing NGINX config means just rerunning NGINX part). [0] https://deploymentfromscratch.com/ https://deploymentfromscratch.com/