rails-ansible
rails-ansible copied to clipboard
Improve change tracking
While adding Let's Encypt into the Playbook (PR to follow) I decided to see if I could "fix" some of the tasks that were saying things were changing even when they weren't.
This PR includes several different commits that do that. Looking at individual commits will (hopefully) give you context for why I'm suggesting each change.
I kept using the word "idempotent" in commit messages... I think technically most (but not all) of these things were already idempotent, it was just hard to tell because they kept saying they'd made changes even if they hadn't. I'm also not sure I fully understand the meaning of the word so I should probably stop using it 😝
I've tried to test this thoroughly but it takes such a long time to run through the full playbook that I would sometimes start making the next change before I'd finished fully testing the previous one. FWIW I've been testing with Ubuntu LTS 20.04 on Linode (Nanode size) and with Ruby 2.7.2
Thanks a lot of the pull request Matthew! I am reviewing it now
The nginx restart handler seems failing on first run, I tried running this on fresh Ubuntu instance on DigitalOcean, it seems to timeout weirdly, I am not sure if this is Ansible or DigitalOcean bug, I think I will revert to manual restart at the end of the step for now
Sorry about the poor testing. To shorten the feedback loop I had a separate playbook that I would use to test one or two tasks against a server that had already had the whole thing run against it from scratch... Once all those individual things were done I'd run "from scratch" again (and wait forever) only to discover there were things that needed to be fixed in that mode of operation. And back and forth it went...
I should have spun up more servers to parallelise the testing a bit but I didn't want to waste my Linode credits 🙂
Sorry about the poor testing. To shorten the feedback loop I had a separate playbook that I would use to test one or two tasks against a server that had already had the whole thing run against it from scratch... Once all those individual things were done I'd run "from scratch" again (and wait forever) only to discover there were things that needed to be fixed in that mode of operation. And back and forth it went...
I should have spun up more servers to parallelise the testing a bit but I didn't want to waste my Linode credits 🙂
No worries Matthew! Thanks a lot of the PR, I really appreciate your effort! If you haven't had a DigitalOcean account, I can give you a referral code which you can get $100 credit upon sign up which you can use it for testing.