..and then the project is deployed without updating mix.lock, then the NEXT deploy after that will fail:
TASK: [HashNuke.elixir-stack | clone project] *********************************
failed: [178.62.201.149] => {"failed": true}
msg: Local modifications exist in repository (force=no).
FATAL: all hosts have already failed -- aborting
PLAY RECAP ********************************************************************
to retry, use: --limit @/home/johwar/deploy.retry
178.62.201.149 : ok=9 changed=0 unreachable=0 failed=1
This is due to the Ansible 'git' task not forcing overwrites of modified files in the working tree by default. At the first deploy, mix.lock in the working tree on the server was updated with the new dependency, meaning it's now modified compared to what's in the Git repo.. so when we deploy a second time, the 'git' task fails as above.
If a new dependency is added to mix.exs, eg:
..and then the project is deployed without updating
mix.lock
, then the NEXT deploy after that will fail:This is due to the Ansible 'git' task not forcing overwrites of modified files in the working tree by default. At the first deploy,
mix.lock
in the working tree on the server was updated with the new dependency, meaning it's now modified compared to what's in the Git repo.. so when we deploy a second time, the 'git' task fails as above.