Description
Describe the bug
After an installation with nginx_install_from: source
the latest available version is installed successfully.
Problems:
a). Repeating the ansible run results in a skipped installation process, even if a differnt version that the latest would exist in /usr/sbin/nginx
.
b). Rebooting the server leads to empty /tmp
dir, which leads to a complete new compilation and installation on the next ansible-run, even if the /usr/sbin/nginx
version is already the target version.
To reproduce
a) Steps to reproduce the behavior:
- Deploy the Ansible NGINX role using
nginx_install_from: source
- check the version number with
/usr/sbin/nginx -v
- wait for new nginx version to be released (do no reboot of the server in the meantime to preserve
/tmp
content) - repeat 1 and 2
result: the version was not updated, even that there is a newer existing. Update: maybe this is only a problem if nginx was previously installed via the ansible role in the latest version, the directories below /tmp
are still existing, but in the meantime the /usr/sbin/nginx
was replaced by a older version, e.g. if some other package installes nginx
as an dependency.
b) Steps to reproduce the behavior:
- Deploy the Ansible NGINX role using
nginx_install_from: source
- repeat 1, notice that the
Make .. (dependency)
andInstall ...
tasks are skipped - reboot the server
- repeat 1
result: the Make .. (dependency)
and Install ...
tasks are not skipped any more, even that the target version already exists in /usr/sbin/nginx
log of problem b)
log output_b.log
Expected behavior
The current installed version at /usr/sbin/nginx
should be taken into account. If the installed version is the target version, all upcoming tasks can be skipped. Also a reboot of the server should not change the behaviour of the ansible tasks.
Your environment
- Version of the Ansible NGINX role or specific commit
- name: nginxinc.nginx
version: "0.24.1"
- Version of Ansible
2.15.2
- Target deployment platform
Ubuntu 20.04