diff --git a/README.md b/README.md index 7073d9f..2c7dc19 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ -Nginx for Debian/FreeBSD Ansible role +Nginx for Debian/Ubuntu Ansible role ===================================== [![Ansible Galaxy](http://img.shields.io/badge/ansible--galaxy-HanXHX.nginx-blue.svg)](https://galaxy.ansible.com/HanXHX/nginx/) ![GitHub Workflow Status (master branch)](https://img.shields.io/github/actions/workflow/status/hanxhx/ansible-nginx/molecule.yml?branch=master) -Install and configure Nginx on Debian/FreeBSD. +Install and configure Nginx on Debian/Ubuntu. Features: @@ -27,8 +27,6 @@ Supported OS: | Debian Buster (10) | Yes | Yes | | Debian Bullseye (11) | Yes | Yes | | Debian Bookworm (12) | Yes | Not yet :) | -| FreeBSD 11 | NA | No | -| FreeBSD 12 | NA | No | | Ubuntu 20.04 | Yes | Yes | | Ubuntu 22.04 | Yes | Yes | @@ -48,10 +46,6 @@ Debian: - `nginx_apt_package`: APT nginx package (try: apt-cache search ^nginx) - `nginx_backports`: Install nginx from backport repository (bool) -FreeBSD: - -- `nginx_pkgng_package`: PKGNG nginx package (should be "nginx" or "nginx-devel") - ### Shared - `nginx_root`: root directory where you want to have your files @@ -72,7 +66,6 @@ FreeBSD: - `nginx_custom_core`: instructions list (for core, will put data in `/etc/nginx/nginx.conf`) - `nginx_custom_http`: instructions list (will put data in `/etc/nginx/conf.d/custom.conf`) - `nginx_module_packages`: package list module to install (Debian) -- `nginx_load_modules`: module list to load (full path), should be used only on FreeBSD ### Misc @@ -96,15 +89,12 @@ Fine configuration [Basic Auth](doc/auth.md) -[FreeBSD](doc/freebsd.md) - [acme.sh](doc/acme.md) Note ---- - Active support for Debian/Ubuntu. -- FreeBSD support is experimental. I only test (for the moment) 10.2 (but it can work on other versions). Dependencies ------------ diff --git a/defaults/main.yml b/defaults/main.yml index c83c350..1250c93 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -3,8 +3,6 @@ # Debian nginx_apt_package: nginx-full nginx_backports: false -# FreeBSD -nginx_pkgng_package: nginx # # Nginx shared variables diff --git a/doc/freebsd.md b/doc/freebsd.md deleted file mode 100644 index 8a1c40d..0000000 --- a/doc/freebsd.md +++ /dev/null @@ -1,12 +0,0 @@ -Freebsd -======= - -Limitations ------------ - -Due to Ansible + FreeBSD limitations (`ansible_processor_vcpus`), You must explicitely set `nginx_worker_processes`. - -About modules -------------- - -Dynamic modules must be set with full path (see `nginx_load_modules` path). diff --git a/meta/main.yml b/meta/main.yml index 7445dcc..3056cf6 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -4,7 +4,7 @@ galaxy_info: author: Emilien Mantel namespace: hanxhx role_name: nginx - description: Nginx for Debian / FreeBSD + description: Nginx for Debian / Ubuntu company: TripleStack license: GPLv2 min_ansible_version: '2.11' @@ -18,11 +18,6 @@ galaxy_info: versions: - focal - jammy - - name: FreeBSD - versions: - - '11.0' - - '11.1' - - '12.0' galaxy_tags: - web - debian diff --git a/molecule/_shared/group_vars/all/main.yml b/molecule/_shared/group_vars/all/main.yml index d6a86ae..87d7417 100644 --- a/molecule/_shared/group_vars/all/main.yml +++ b/molecule/_shared/group_vars/all/main.yml @@ -3,7 +3,7 @@ # Internal vars int_ansible_ssl_dir: '/etc/ansible-ssl' # Role vars -nginx_worker_processes: 1 # Ansible+FreeBSD can't detect CPU number +nginx_worker_processes: 1 # Ansible can't detect CPU count nginx_apt_package: 'nginx-extras' nginx_module_packages: ['libnginx-mod-http-headers-more-filter'] nginx_custom_core: diff --git a/tasks/install/FreeBSD.yml b/tasks/install/FreeBSD.yml deleted file mode 100644 index f0784a6..0000000 --- a/tasks/install/FreeBSD.yml +++ /dev/null @@ -1,59 +0,0 @@ ---- - -- name: PKGNG | Install nginx and related tools - community.general.pkgng: - name: "{{ item }}" - state: present - loop: - - acme.sh - - "{{ nginx_pkgng_package }}" - - py27-passlib - - curl - -# -# Bypass https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=224166#c1 -# -- name: Bypass https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=224166#c1 - when: true - block: - - - name: COMMAND | Create /usr/local/etc/fdfs/http.conf - ansible.builtin.command: touch /usr/local/etc/fdfs/http.conf - args: - creates: /usr/local/etc/fdfs/http.conf - notify: Restart nginx - - - name: LINEINFILE | Tune fdfs - ansible.builtin.lineinfile: - regexp: ^load_fdfs_parameters_from_tracker - line: load_fdfs_parameters_from_tracker=false - path: /usr/local/etc/fdfs/mod_fastdfs.conf - notify: Restart nginx - - - name: META | Flush handlers (Restart nginx when fdfs is tuned) - ansible.builtin.meta: flush_handlers - -- name: FILE | Create configuration dir (like Debian) - ansible.builtin.file: - path: "{{ nginx_etc_dir }}/{{ item }}" - state: directory - mode: 0755 - owner: root - group: root - loop: - - conf.d - - sites-available - - sites-enabled - -- name: FILE | Create log directory - ansible.builtin.file: - path: "{{ nginx_log_dir }}" - owner: "{{ nginx_user }}" - group: wheel - mode: 0755 - state: directory - -- name: SERVICE | Enable nginx - ansible.builtin.service: - name: nginx - enabled: true diff --git a/vars/FreeBSD.yml b/vars/FreeBSD.yml deleted file mode 100644 index f1273e8..0000000 --- a/vars/FreeBSD.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- - -nginx_events_use: 'kqueue' -nginx_pid: '/var/run/nginx.pid' -nginx_etc_dir: '/usr/local/etc/nginx' - -nginx_acmesh_bin: '/usr/local/sbin/acme.sh'