Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

Commit

Permalink
Merge pull request #29 from hexadecimalDinosaur/nginx-security-updates
Browse files Browse the repository at this point in the history
NGINX security updates
  • Loading branch information
hexadecimalDinosaur authored Dec 3, 2023
2 parents 7935045 + 6ccebbb commit ae594bd
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 2 deletions.
1 change: 1 addition & 0 deletions ansible/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ server {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
server_tokens off;
}
22 changes: 21 additions & 1 deletion ansible/nginx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,29 @@
ansible.builtin.wait_for_connection:
timeout: 300
tasks:
- name: Install nginx repository prerequisites
ansible.builtin.package:
name:
- curl
- gnupg2
- ca-certificates
- lsb-release
- debian-archive-keyring
state: present
- name: Get NGINX keyring
ansible.builtin.shell: >
curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor | sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null
- name: Install NGINX repository
ansible.builtin.shell: >
echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] http://nginx.org/packages/debian `lsb_release -cs` nginx" | sudo tee /etc/apt/sources.list.d/nginx.list
- name: Setup Repository pinning
ansible.builtin.shell: >
echo -e "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" | sudo tee /etc/apt/preferences.d/99nginx
- name: Install nginx
ansible.builtin.package:
name: nginx
name:
- nginx
- nginx-extras
state: present
notify: Restart nginx
- name: Copy nginx config
Expand Down
1 change: 1 addition & 0 deletions deploy_bundle/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ server {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
server_tokens off;
}
22 changes: 21 additions & 1 deletion deploy_bundle/nginx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,29 @@
ansible.builtin.wait_for_connection:
timeout: 300
tasks:
- name: Install nginx repository prerequisites
ansible.builtin.package:
name:
- curl
- gnupg2
- ca-certificates
- lsb-release
- debian-archive-keyring
state: present
- name: Get NGINX keyring
ansible.builtin.shell: >
curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor | sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null
- name: Install NGINX repository
ansible.builtin.shell: >
echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] http://nginx.org/packages/debian `lsb_release -cs` nginx" | sudo tee /etc/apt/sources.list.d/nginx.list
- name: Setup Repository pinning
ansible.builtin.shell: >
echo -e "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" | sudo tee /etc/apt/preferences.d/99nginx
- name: Install nginx
ansible.builtin.package:
name: nginx
name:
- nginx
- nginx-extras
state: present
notify: Restart nginx
- name: Copy nginx config
Expand Down

0 comments on commit ae594bd

Please sign in to comment.