Setup repo pin. to ensure nginx package gets installed from NGINX repos
This commit is contained in:
parent
38fc33ce70
commit
2efdfcad6d
|
@ -53,3 +53,7 @@ server {
|
||||||
resolver 127.0.0.1;
|
resolver 127.0.0.1;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Links & Resources
|
||||||
|
|
||||||
|
- <https://docs.nginx.com/nginx/admin-guide/installing-nginx/installing-nginx-open-source/#installing-prebuilt-debian-packages>
|
||||||
|
|
|
@ -29,5 +29,17 @@
|
||||||
become: true
|
become: true
|
||||||
notify: apt-get update
|
notify: apt-get update
|
||||||
|
|
||||||
|
- name: set up repository pinning to make sure nginx package gets installed from NGINX repositories
|
||||||
|
ansible.builtin.copy:
|
||||||
|
content: |
|
||||||
|
Package: *
|
||||||
|
Pin: origin nginx.org
|
||||||
|
Pin: release o=nginx
|
||||||
|
Pin-Priority: 900
|
||||||
|
dest: /etc/apt/preferences.d/99nginx
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: "0644"
|
||||||
|
|
||||||
- name: Flush handlers to make sure "apt-get update" handler runs, if needed
|
- name: Flush handlers to make sure "apt-get update" handler runs, if needed
|
||||||
ansible.builtin.meta: flush_handlers
|
ansible.builtin.meta: flush_handlers
|
||||||
|
|
Loading…
Reference in a new issue