Skip to content

Commit

Permalink
Fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
FrankApiyo committed May 3, 2024
1 parent 2c6433f commit 8941357
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 12 deletions.
9 changes: 5 additions & 4 deletions defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
# file: nginx/defaults/main.yml

nginx_install_method: "package"

nginx_install_method: "{{ 'package' if ansible_distribution_version == '22.04' else 'source' }}"
nginx_source_version: "1.25.2"
nginx: "nginx"
ubuntu_release: "focal"
Expand Down Expand Up @@ -147,8 +148,8 @@ nginx_upload_progress_url: "https://github.com/masterzen/nginx-upload-progress-m


# headers_more_module configuration
nginx_headers_more_version: "0.261"
nginx_headers_more_url: "https://github.com/agentzh/headers-more-nginx-module/archive/v{{nginx_headers_more_version}}.tar.gz"
nginx_headers_more_version: "0.26"
nginx_headers_more_url: "https://github.com/openresty/headers-more-nginx-module/archive/refs/tags/v{{nginx_headers_more_version}}.tar.gz"


# http_auth_request_module configuration
Expand All @@ -158,7 +159,7 @@ nginx_auth_request_url: "http://mdounin.ru/hg/ngx_http_auth_request_module/archi

# http_echo_module configuration
nginx_echo_version: "0.58"
nginx_echo_url: "https://github.com/agentzh/echo-nginx-module/archive/v{{nginx_echo_version}}.tar.gz"
nginx_echo_url: "https://github.com/openresty/echo-nginx-module/archive/refs/tags/v{{nginx_echo_version}}.tar.gz"


# http_realip_module configuration
Expand Down
1 change: 0 additions & 1 deletion molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
- key.pem
roles:
- role: ansible-nginx
nginx_install_method: "package"
nginx_ssl_dir: "{{ nginx_dir }}/ssl/tests/{{ site.server.server_name }}"
nginx_access_logs:
- name: "example_com_access_format"
Expand Down
10 changes: 6 additions & 4 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ platforms:
privileged: true
command: /sbin/init
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- /sys/fs/cgroup:/sys/fs/cgroup:rw
env:
LC_ALL: "C.UTF-8"
LANG: "C.UTF-8"
Expand All @@ -24,16 +24,18 @@ platforms:
privileged: true
command: /sbin/init
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- /sys/fs/cgroup:/sys/fs/cgroup:rw
env:
LC_ALL: "C.UTF-8"
LANG: "C.UTF-8"
- name: nginx-ubuntu-22.04
image: geerlingguy/docker-ubuntu2204-ansible:latest
image: geerlingguy/docker-${MOLECULE_DISTRO:-ubuntu2204}-ansible:latest
privileged: true
pre_build_image: true
command: /sbin/init
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- /sys/fs/cgroup:/sys/fs/cgroup:rw
cgroupns_mode: host
env:
LC_ALL: "C.UTF-8"
LANG: "C.UTF-8"
Expand Down
1 change: 0 additions & 1 deletion molecule/install-only/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
- key.pem
roles:
- role: ansible-nginx
nginx_install_method: "package"
nginx_ssl_dir: "{{ nginx_dir }}/ssl/tests/{{ site.server.server_name }}"
nginx_install_only: true
nginx_access_logs:
Expand Down
2 changes: 2 additions & 0 deletions molecule/install-only/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ platforms:
- name: ubuntu-16.04
image: solita/ubuntu-systemd:16.04
privileged: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
command: /sbin/init
provisioner:
name: ansible
Expand Down
6 changes: 4 additions & 2 deletions tasks/package.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
---
# file: nginx/tasks/package.yml
- name: Run the equivalent of "apt-get update" as a separate step
apt:
update_cache: yes

- name: Nginx | Make sure the ansible required dependencies are installed
apt:
name:
- python3-pycurl
- dirmngr
- gnupg
- wget
state: present

# make the KEY_ID a var
- name: Add nginx GPG key
command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys ABF5BD827BD9BF62

Expand Down
1 change: 1 addition & 0 deletions tasks/source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
- libpcre3-dev
- libssl-dev
- libssl1.1
- wget

- name: Nginx | Download the Nginx source release if not yet present
get_url:
Expand Down

0 comments on commit 8941357

Please sign in to comment.