The playbook reloads the puma service when possible because it's faster.
I deployed a js-only fix a few minutes ago. Ansible did correctly recompile assets, but the new version didn't appear in prod until I manually ran systemctl restart lobsters-puma. I expect that the same problem would happen with css-only changes, Rails uses the same mechanism of hashing asset contents to use as URL names.
Tasks in roles/lobsters/tasks/main.yml need to update to detect if there were changes in app/assets. The recompile assets task only needs to run if paths there changed. And then the phased restarted puma task shouldn't run and the restart puma task should run.
The playbook reloads the puma service when possible because it's faster.
I deployed a js-only fix a few minutes ago. Ansible did correctly recompile assets, but the new version didn't appear in prod until I manually ran
systemctl restart lobsters-puma
. I expect that the same problem would happen with css-only changes, Rails uses the same mechanism of hashing asset contents to use as URL names.Tasks in
roles/lobsters/tasks/main.yml
need to update to detect if there were changes inapp/assets
. Therecompile assets
task only needs to run if paths there changed. And then thephased restarted puma
task shouldn't run and therestart puma
task should run.