Skip to content

Commit

Permalink
Merge branch 'geerlingguy:master' into AllowDefaultVhostPathOverride
Browse files Browse the repository at this point in the history
  • Loading branch information
ndf-dw authored Aug 19, 2024
2 parents 5bc6739 + be2db5b commit 1770a2c
Show file tree
Hide file tree
Showing 9 changed files with 48 additions and 11 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out the codebase.
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: 'geerlingguy.nginx'

- name: Set up Python 3.
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: '3.x'

Expand All @@ -41,19 +41,19 @@ jobs:
strategy:
matrix:
distro:
- rockylinux8
- ubuntu2004
- ubuntu1804
- debian10
- rockylinux9
- ubuntu2204
- debian12
- opensuseleap15

steps:
- name: Check out the codebase.
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: 'geerlingguy.nginx'

- name: Set up Python 3.
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: '3.x'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out the codebase.
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: 'geerlingguy.nginx'

- name: Set up Python 3.
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: '3.x'

Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
*.pyc
.cache

venv/
.vscode/
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ Configures Nginx's [`log_format`](http://nginx.org/en/docs/http/ngx_http_log_mod

(For RedHat/CentOS only) Set this to `false` to disable the installation of the `nginx` yum repository. This could be necessary if you want the default OS stable packages, or if you use Satellite.

nginx_zypper_repo_enabled: true

(For Suse only) Set this to `false` to disable the installation of the `nginx` zypper repository. This could be necessary if you want the default OS stable packages, or if you use Suse Manager.

nginx_service_state: started
nginx_service_enabled: yes

Expand Down
3 changes: 3 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ nginx_default_release: ""
# Used only for Redhat installation, enables source Nginx repo.
nginx_yum_repo_enabled: true

# Used only for Suse installation, enables source Nginx repo.
nginx_zypper_repo_enabled: true

# Use the official Nginx PPA for Ubuntu, and the version to use if so.
nginx_ppa_use: false
nginx_ppa_version: stable
Expand Down
4 changes: 3 additions & 1 deletion molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
role_name_check: 1
dependency:
name: galaxy
options:
ignore-errors: true
driver:
name: docker
platforms:
- name: instance
image: "geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest"
image: "geerlingguy/docker-${MOLECULE_DISTRO:-rockylinux9}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
Expand Down
3 changes: 3 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
- include_tasks: setup-Archlinux.yml
when: ansible_os_family == 'Archlinux'

- include_tasks: setup-Suse.yml
when: ansible_os_family == 'Suse'

# Vhost configuration.
- import_tasks: vhosts.yml

Expand Down
14 changes: 14 additions & 0 deletions tasks/setup-Suse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
- name: Enable nginx repo.
zypper_repository:
name: nginx
repo: http://nginx.org/packages/sles/{{ ansible_distribution_major_version }}
state: present
disable_gpg_check: true
autorefresh: true
when: nginx_zypper_repo_enabled | bool

- name: Ensure nginx is installed.
package:
name: "{{ nginx_package_name }}"
state: present
9 changes: 9 additions & 0 deletions vars/Suse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
root_group: root
nginx_conf_path: /etc/nginx/conf.d
nginx_conf_file_path: /etc/nginx/nginx.conf
nginx_mime_file_path: /etc/nginx/mime.types
nginx_pidfile: /var/run/nginx.pid
nginx_vhost_path: /etc/nginx/conf.d
nginx_default_vhost_path: /etc/nginx/conf.d/default.conf
__nginx_user: "nginx"

0 comments on commit 1770a2c

Please sign in to comment.