Open
Description
Hello,
I installed nginx with this ansible role on Debian buster (Debian 10).
I want a stable production environment, and at first I hadn't noticed the ansible variable nginx_branch
, which defaults to mainline
.
When I noticed the variable, I tried to switch from mainline
to stable
.
The simple variable change is not enough because the repository line are appended (instead of replacing the existing lines) in the /etc/apt/sources.list.d/nginx.list
file :
2023-02-17 18:42:54,155 p=191540 u=xxx n=ansible | changed: [xxx] => (item=deb-src [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] https://nginx.org/packages/debian/ buster nginx)
2023-02-17 18:44:57,657 p=193486 u=xxx n=ansible | included: /home/xxx/code/xxx/external/roles/nginxinc.nginx/tasks/opensource/install-debian.yml for xxx
deb [arch=amd64 signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] https://nginx.org/packages/mainline/debian/ buster nginx
deb-src [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] https://nginx.org/packages/mainline/debian/ buster nginx
+deb [arch=amd64 signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] https://nginx.org/packages/debian/ buster nginx
2023-02-17 18:45:01,396 p=193486 u=xxx n=ansible | changed: [xxx] => (item=deb [arch=amd64 signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] https://nginx.org/packages/debian/ buster nginx)
deb [arch=amd64 signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] https://nginx.org/packages/mainline/debian/ buster nginx
deb-src [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] https://nginx.org/packages/mainline/debian/ buster nginx
deb [arch=amd64 signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] https://nginx.org/packages/debian/ buster nginx
+deb-src [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] https://nginx.org/packages/debian/ buster nginx
The repository should IMO be overriding the actual file content in order to correctly switch from mainline
to stable
(or the other way around).