I use Ansible to deploy .deb packages from my own repository.
Sometimes a developer may forget to change the package number, so there will be a new package in the repository with the old version. This is not necessary, so I would like to always reinstall the package. How can i do this?
For apt module force=yesoption force=yes. Ansible documentation says:
If yes, forcibly installs / removes.
But it is like taking any warnings by force. At least when I turn it off, Ansible is blocked with an untrusted source warning. (Both storage and servers are on the same intranet, so there should be no problems)
I could use this:
- name: force-reinstall myservice
shell: apt-get --reinstall install myservice
But this way I cannot use other options for apt module, and Ansible is blocked by warnings in the same way.
Is there a way to always reinstall the package and avoid being blocked by interactivity?
source
share