Improve formatting (#293)
This commit is contained in:
parent
c85368e591
commit
fc4640bd4a
4
.github/pull_request_template.md
vendored
4
.github/pull_request_template.md
vendored
@ -5,6 +5,6 @@ Describe the use case and detail of the change. If this PR addresses an issue on
|
||||
Before creating a PR, run through this checklist and mark each as complete.
|
||||
|
||||
- [ ] I have read the [CONTRIBUTING](https://github.com/nginxinc/ansible-role-nginx/blob/master/CONTRIBUTING.md) document
|
||||
- [ ] If necessary, I have added Molecule tests that prove my fix is effective or that my feature works
|
||||
- [ ] I have added Molecule tests that prove my fix is effective or that my feature works
|
||||
- [ ] I have checked that all Molecule tests pass after adding my changes
|
||||
- [ ] I have updated any necessary documentation (`defaults/main/*.yml`, `README.md` and `CHANGELOG.md`)
|
||||
- [ ] I have updated any relevant documentation (`defaults/main/*.yml`, `README.md` and `CHANGELOG.md`)
|
||||
|
@ -39,6 +39,7 @@ ENHANCEMENTS:
|
||||
|
||||
* Molecule tests using Testinfra have been migrated to use Ansible instead.
|
||||
* The role now uses `include_tasks` instead of `import_tasks` when possible to speed up the role's execution time.
|
||||
* Improve configuration cleanup capabilities. You can now remove all `*.conf` files in a given directory, or specify a list of files you wish to delete.
|
||||
* Improve configuration templating capabilities:
|
||||
* Add support for unix upstreams.
|
||||
* Add PID templating option.
|
||||
|
@ -137,14 +137,15 @@ Debian:
|
||||
versions:
|
||||
- jessie
|
||||
- stretch
|
||||
Ubuntu:
|
||||
versions:
|
||||
- xenial
|
||||
- bionic
|
||||
RedHat:
|
||||
versions:
|
||||
- 6
|
||||
- 7
|
||||
Ubuntu:
|
||||
versions:
|
||||
- xenial
|
||||
- bionic
|
||||
- focal
|
||||
```
|
||||
|
||||
**NGINX Unit**
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
- name: "(Install/Config: All OSs) Install and Configure NGINX"
|
||||
block:
|
||||
|
||||
- name: "(Install: All OSs) Install NGINX"
|
||||
block:
|
||||
- name: "(Install: All OSs) Install NGINX Open Source"
|
||||
|
@ -37,7 +37,7 @@
|
||||
- name: "(Install: OpenBSD) Install NGINX Package"
|
||||
openbsd_pkg:
|
||||
name: "nginx{{ nginx_version | default('') }}"
|
||||
build: false
|
||||
build: no
|
||||
state: "{{ nginx_state }}"
|
||||
when: nginx_bsd_install_packages
|
||||
notify: "(Handler: All OSs) Start NGINX"
|
||||
@ -45,7 +45,7 @@
|
||||
- name: "(Install: OpenBSD) Install NGINX Port"
|
||||
openbsd_pkg:
|
||||
name: "nginx{{ nginx_version | default('') }}"
|
||||
build: true
|
||||
build: yes
|
||||
state: "{{ nginx_state }}"
|
||||
when: not nginx_bsd_install_packages
|
||||
notify: "(Handler: All OSs) Start NGINX"
|
||||
|
@ -22,7 +22,7 @@
|
||||
- name: "(Install: CentOS/RedHat) Add NGINX Repository for CentOS/RHEL 8"
|
||||
blockinfile:
|
||||
path: /etc/yum.repos.d/nginx.repo
|
||||
create: true
|
||||
create: yes
|
||||
block: |
|
||||
[nginx]
|
||||
baseurl = {{ repository }}
|
||||
|
@ -7,7 +7,7 @@
|
||||
- python3
|
||||
- python3-pip
|
||||
- python3-devel
|
||||
update_cache: true
|
||||
update_cache: yes
|
||||
when: ansible_os_family == "RedHat"
|
||||
|
||||
- name: "(Install: Centos/RHEL) Set Python3 Default"
|
||||
@ -32,7 +32,7 @@
|
||||
- wget
|
||||
- ca-certificates
|
||||
- zlib-devel
|
||||
update_cache: true
|
||||
update_cache: yes
|
||||
when: ansible_os_family == "RedHat"
|
||||
|
||||
- name: "(Install: Debian) Install Backports Repo For Buster"
|
||||
@ -50,7 +50,7 @@
|
||||
- checkinstall
|
||||
- zlib1g-dev
|
||||
- libtemplate-perl
|
||||
update_cache: true
|
||||
update_cache: yes
|
||||
when: ansible_os_family == "Debian"
|
||||
|
||||
- name: "(Install: Alpine) Install Build Tools"
|
||||
@ -65,7 +65,7 @@
|
||||
- linux-headers
|
||||
- tar
|
||||
- openrc
|
||||
update_cache: true
|
||||
update_cache: yes
|
||||
when: ansible_os_family == "Alpine"
|
||||
|
||||
- name: "(Install: Alpine) Enable OpenRC"
|
||||
@ -98,7 +98,7 @@
|
||||
- name: "(Install: Centos/RHEL) Install PCRE Dependency From Package"
|
||||
yum:
|
||||
name: pcre-devel
|
||||
update_cache: true
|
||||
update_cache: yes
|
||||
when:
|
||||
- nginx_install_source_pcre
|
||||
- ansible_os_family == "RedHat"
|
||||
@ -106,7 +106,7 @@
|
||||
- name: "(Install: Debian/Ubuntu) Install PCRE Dependency From Package"
|
||||
apt:
|
||||
name: libpcre3-dev
|
||||
update_cache: true
|
||||
update_cache: yes
|
||||
when:
|
||||
- nginx_install_source_pcre
|
||||
- ansible_os_family == "Debian"
|
||||
@ -114,7 +114,7 @@
|
||||
- name: "(Install: Alpine) Install PCRE Dependency From Package"
|
||||
apk:
|
||||
name: pcre-dev
|
||||
update_cache: true
|
||||
update_cache: yes
|
||||
when:
|
||||
- nginx_install_source_pcre
|
||||
- ansible_os_family == "Alpine"
|
||||
@ -155,7 +155,7 @@
|
||||
- name: "(Install: Centos/RHEL) Install ZLib Dependency From Package"
|
||||
yum:
|
||||
name: zlib-devel
|
||||
update_cache: true
|
||||
update_cache: yes
|
||||
when:
|
||||
- nginx_install_source_zlib
|
||||
- ansible_os_family == "RedHat"
|
||||
@ -171,7 +171,7 @@
|
||||
- name: "(Install: Alpine) Install ZLib Dependency From Package"
|
||||
apk:
|
||||
name: zlib-dev
|
||||
update_cache: true
|
||||
update_cache: yes
|
||||
when:
|
||||
- nginx_install_source_zlib
|
||||
- ansible_os_family == "Alpine"
|
||||
@ -212,7 +212,7 @@
|
||||
- name: "(Install: Centos/RHEL) Install OpenSSL Dependency From Package"
|
||||
yum:
|
||||
name: openssl-devel
|
||||
update_cache: true
|
||||
update_cache: yes
|
||||
when:
|
||||
- nginx_install_source_openssl
|
||||
- ansible_os_family == "RedHat"
|
||||
@ -220,7 +220,7 @@
|
||||
- name: "(Install: Debian/Ubuntu) Install OpenSSL Dependency From Package"
|
||||
apt:
|
||||
name: libssl-dev
|
||||
update_cache: true
|
||||
update_cache: yes
|
||||
when:
|
||||
- nginx_install_source_openssl
|
||||
- ansible_os_family == "Debian"
|
||||
@ -228,7 +228,7 @@
|
||||
- name: "(Install: Alpine) Install OpenSSL Dependency From Package"
|
||||
apk:
|
||||
name: openssl-dev
|
||||
update_cache: true
|
||||
update_cache: yes
|
||||
when:
|
||||
- nginx_install_source_openssl
|
||||
- ansible_os_family == "Alpine"
|
||||
@ -271,7 +271,7 @@
|
||||
- name: "(Install: Linux) Fetch NGINX Version"
|
||||
uri:
|
||||
url: https://trac.nginx.org/nginx/browser
|
||||
return_content: true
|
||||
return_content: yes
|
||||
register: nginx_versions
|
||||
|
||||
- name: "(Install: Linux) Set NGINX Mainline Version"
|
||||
@ -296,7 +296,7 @@
|
||||
- name: "(Install: Linux) Check For NGINX Install"
|
||||
stat:
|
||||
path: /usr/sbin/nginx
|
||||
follow: true
|
||||
follow: yes
|
||||
register: nginx_result
|
||||
|
||||
- name: "(Install: Linux) Add NGINX User"
|
||||
|
@ -19,9 +19,8 @@
|
||||
when: ansible_distribution == "Alpine"
|
||||
|
||||
- include_tasks: "{{ role_path }}/tasks/plus/setup-{{ ansible_os_family | lower }}.yml"
|
||||
when:
|
||||
- ansible_os_family == "Alpine"
|
||||
or ansible_os_family == "FreeBSD"
|
||||
or ansible_os_family == "Debian"
|
||||
or ansible_os_family == "RedHat"
|
||||
or ansible_os_family == "Suse"
|
||||
when: ansible_os_family == "Alpine"
|
||||
or ansible_os_family == "FreeBSD"
|
||||
or ansible_os_family == "Debian"
|
||||
or ansible_os_family == "RedHat"
|
||||
or ansible_os_family == "Suse"
|
||||
|
@ -1,10 +1,9 @@
|
||||
---
|
||||
- include_tasks: "{{ role_path }}/tasks/plus/setup-{{ ansible_os_family | lower }}.yml"
|
||||
when:
|
||||
- ansible_os_family == "Alpine"
|
||||
or ansible_os_family == "Debian"
|
||||
or ansible_os_family == "RedHat"
|
||||
or ansible_os_family == "Suse"
|
||||
when: ansible_os_family == "Alpine"
|
||||
or ansible_os_family == "Debian"
|
||||
or ansible_os_family == "RedHat"
|
||||
or ansible_os_family == "Suse"
|
||||
|
||||
- name: "(Install: Linux) Modify Service for Systemd"
|
||||
include_tasks: "{{ role_path }}/tasks/prerequisites/setup-systemd.yml"
|
||||
|
@ -1,7 +1,6 @@
|
||||
---
|
||||
- name: "(Setup: All OSs Besides Alpine Linux) Setup NGINX Plus License"
|
||||
block:
|
||||
|
||||
- name: "(Setup: All OSs Besides Alpine Linux) Create SSL Directory"
|
||||
file:
|
||||
path: /etc/ssl/nginx
|
||||
@ -15,12 +14,10 @@
|
||||
loop:
|
||||
- "{{ nginx_license.certificate }}"
|
||||
- "{{ nginx_license.key }}"
|
||||
|
||||
when: ansible_distribution != "Alpine"
|
||||
|
||||
- name: "(Setup: Alpine Linux) Setup NGINX Plus License"
|
||||
block:
|
||||
|
||||
- name: "(Setup: Alpine Linux) Create APK Directory"
|
||||
file:
|
||||
path: /etc/apk
|
||||
@ -37,5 +34,4 @@
|
||||
src: "{{ nginx_license.certificate }}"
|
||||
dest: /etc/apk/cert.pem
|
||||
decrypt: yes
|
||||
|
||||
when: ansible_distribution == "Alpine"
|
||||
|
@ -5,4 +5,4 @@
|
||||
- apt-transport-https
|
||||
- dirmngr
|
||||
- python-apt
|
||||
update_cache: true
|
||||
update_cache: yes
|
||||
|
Loading…
Reference in New Issue
Block a user