Skip to content

Commit

Permalink
Fix Nginx apt-key is deprecated failure (#1518)
Browse files Browse the repository at this point in the history
  • Loading branch information
Twansparant authored May 30, 2024
1 parent b791d54 commit a085156
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 0 additions & 2 deletions roles/nginx/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
---
nginx_keyserver: "https://nginx.org/keys/nginx_signing.key"
nginx_keyserver_id: "ABF5BD827BD9BF62"
nginx_ppa: "deb http://nginx.org/packages/mainline/ubuntu {{ ansible_distribution_release }} nginx"
nginx_package: nginx
nginx_conf: nginx.conf.j2
Expand Down
10 changes: 5 additions & 5 deletions roles/nginx/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
---
- name: Add Nginx APT key
apt_key:
keyserver: "{{ nginx_keyserver }}"
id: "{{ nginx_keyserver_id }}"
ansible.builtin.apt_key:
url: "https://nginx.org/keys/nginx_signing.key"
state: present

- name: Add Nginx PPA
apt_repository:
repo: "{{ nginx_ppa }}"
update_cache: yes

- name: Install Nginx
apt:
ansible.builtin.apt:
name: "{{ nginx_package }}"
state: "{{ nginx_package_state | default(apt_package_state) }}"
cache_valid_time: "{{ apt_cache_valid_time }}"
update_cache: true

- name: Ensure site directories exist
file:
Expand Down

0 comments on commit a085156

Please sign in to comment.