Skip to content

Commit fc4640b

Browse files
authored
Improve formatting (#293)
1 parent c85368e commit fc4640b

File tree

11 files changed

+35
-40
lines changed

11 files changed

+35
-40
lines changed

.github/pull_request_template.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ Describe the use case and detail of the change. If this PR addresses an issue on
55
Before creating a PR, run through this checklist and mark each as complete.
66

77
- [ ] I have read the [CONTRIBUTING](https://github.com/nginxinc/ansible-role-nginx/blob/master/CONTRIBUTING.md) document
8-
- [ ] If necessary, I have added Molecule tests that prove my fix is effective or that my feature works
8+
- [ ] I have added Molecule tests that prove my fix is effective or that my feature works
99
- [ ] I have checked that all Molecule tests pass after adding my changes
10-
- [ ] I have updated any necessary documentation (`defaults/main/*.yml`, `README.md` and `CHANGELOG.md`)
10+
- [ ] I have updated any relevant documentation (`defaults/main/*.yml`, `README.md` and `CHANGELOG.md`)

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ ENHANCEMENTS:
3939

4040
* Molecule tests using Testinfra have been migrated to use Ansible instead.
4141
* The role now uses `include_tasks` instead of `import_tasks` when possible to speed up the role's execution time.
42+
* 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.
4243
* Improve configuration templating capabilities:
4344
* Add support for unix upstreams.
4445
* Add PID templating option.

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,14 +137,15 @@ Debian:
137137
versions:
138138
- jessie
139139
- stretch
140-
Ubuntu:
141-
versions:
142-
- xenial
143-
- bionic
144140
RedHat:
145141
versions:
146142
- 6
147143
- 7
144+
Ubuntu:
145+
versions:
146+
- xenial
147+
- bionic
148+
- focal
148149
```
149150
150151
**NGINX Unit**

tasks/main.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
- name: "(Install/Config: All OSs) Install and Configure NGINX"
1919
block:
20-
2120
- name: "(Install: All OSs) Install NGINX"
2221
block:
2322
- name: "(Install: All OSs) Install NGINX Open Source"

tasks/opensource/install-oss-bsd.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@
3737
- name: "(Install: OpenBSD) Install NGINX Package"
3838
openbsd_pkg:
3939
name: "nginx{{ nginx_version | default('') }}"
40-
build: false
40+
build: no
4141
state: "{{ nginx_state }}"
4242
when: nginx_bsd_install_packages
4343
notify: "(Handler: All OSs) Start NGINX"
4444

4545
- name: "(Install: OpenBSD) Install NGINX Port"
4646
openbsd_pkg:
4747
name: "nginx{{ nginx_version | default('') }}"
48-
build: true
48+
build: yes
4949
state: "{{ nginx_state }}"
5050
when: not nginx_bsd_install_packages
5151
notify: "(Handler: All OSs) Start NGINX"

tasks/opensource/setup-redhat.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
- name: "(Install: CentOS/RedHat) Add NGINX Repository for CentOS/RHEL 8"
2323
blockinfile:
2424
path: /etc/yum.repos.d/nginx.repo
25-
create: true
25+
create: yes
2626
block: |
2727
[nginx]
2828
baseurl = {{ repository }}

tasks/opensource/setup-source.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
- python3
88
- python3-pip
99
- python3-devel
10-
update_cache: true
10+
update_cache: yes
1111
when: ansible_os_family == "RedHat"
1212

1313
- name: "(Install: Centos/RHEL) Set Python3 Default"
@@ -32,7 +32,7 @@
3232
- wget
3333
- ca-certificates
3434
- zlib-devel
35-
update_cache: true
35+
update_cache: yes
3636
when: ansible_os_family == "RedHat"
3737

3838
- name: "(Install: Debian) Install Backports Repo For Buster"
@@ -50,7 +50,7 @@
5050
- checkinstall
5151
- zlib1g-dev
5252
- libtemplate-perl
53-
update_cache: true
53+
update_cache: yes
5454
when: ansible_os_family == "Debian"
5555

5656
- name: "(Install: Alpine) Install Build Tools"
@@ -65,7 +65,7 @@
6565
- linux-headers
6666
- tar
6767
- openrc
68-
update_cache: true
68+
update_cache: yes
6969
when: ansible_os_family == "Alpine"
7070

7171
- name: "(Install: Alpine) Enable OpenRC"
@@ -98,23 +98,23 @@
9898
- name: "(Install: Centos/RHEL) Install PCRE Dependency From Package"
9999
yum:
100100
name: pcre-devel
101-
update_cache: true
101+
update_cache: yes
102102
when:
103103
- nginx_install_source_pcre
104104
- ansible_os_family == "RedHat"
105105

106106
- name: "(Install: Debian/Ubuntu) Install PCRE Dependency From Package"
107107
apt:
108108
name: libpcre3-dev
109-
update_cache: true
109+
update_cache: yes
110110
when:
111111
- nginx_install_source_pcre
112112
- ansible_os_family == "Debian"
113113

114114
- name: "(Install: Alpine) Install PCRE Dependency From Package"
115115
apk:
116116
name: pcre-dev
117-
update_cache: true
117+
update_cache: yes
118118
when:
119119
- nginx_install_source_pcre
120120
- ansible_os_family == "Alpine"
@@ -155,7 +155,7 @@
155155
- name: "(Install: Centos/RHEL) Install ZLib Dependency From Package"
156156
yum:
157157
name: zlib-devel
158-
update_cache: true
158+
update_cache: yes
159159
when:
160160
- nginx_install_source_zlib
161161
- ansible_os_family == "RedHat"
@@ -171,7 +171,7 @@
171171
- name: "(Install: Alpine) Install ZLib Dependency From Package"
172172
apk:
173173
name: zlib-dev
174-
update_cache: true
174+
update_cache: yes
175175
when:
176176
- nginx_install_source_zlib
177177
- ansible_os_family == "Alpine"
@@ -212,23 +212,23 @@
212212
- name: "(Install: Centos/RHEL) Install OpenSSL Dependency From Package"
213213
yum:
214214
name: openssl-devel
215-
update_cache: true
215+
update_cache: yes
216216
when:
217217
- nginx_install_source_openssl
218218
- ansible_os_family == "RedHat"
219219

220220
- name: "(Install: Debian/Ubuntu) Install OpenSSL Dependency From Package"
221221
apt:
222222
name: libssl-dev
223-
update_cache: true
223+
update_cache: yes
224224
when:
225225
- nginx_install_source_openssl
226226
- ansible_os_family == "Debian"
227227

228228
- name: "(Install: Alpine) Install OpenSSL Dependency From Package"
229229
apk:
230230
name: openssl-dev
231-
update_cache: true
231+
update_cache: yes
232232
when:
233233
- nginx_install_source_openssl
234234
- ansible_os_family == "Alpine"
@@ -271,7 +271,7 @@
271271
- name: "(Install: Linux) Fetch NGINX Version"
272272
uri:
273273
url: https://trac.nginx.org/nginx/browser
274-
return_content: true
274+
return_content: yes
275275
register: nginx_versions
276276

277277
- name: "(Install: Linux) Set NGINX Mainline Version"
@@ -296,7 +296,7 @@
296296
- name: "(Install: Linux) Check For NGINX Install"
297297
stat:
298298
path: /usr/sbin/nginx
299-
follow: true
299+
follow: yes
300300
register: nginx_result
301301

302302
- name: "(Install: Linux) Add NGINX User"

tasks/plus/delete-license.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@
1919
when: ansible_distribution == "Alpine"
2020

2121
- include_tasks: "{{ role_path }}/tasks/plus/setup-{{ ansible_os_family | lower }}.yml"
22-
when:
23-
- ansible_os_family == "Alpine"
24-
or ansible_os_family == "FreeBSD"
25-
or ansible_os_family == "Debian"
26-
or ansible_os_family == "RedHat"
27-
or ansible_os_family == "Suse"
22+
when: ansible_os_family == "Alpine"
23+
or ansible_os_family == "FreeBSD"
24+
or ansible_os_family == "Debian"
25+
or ansible_os_family == "RedHat"
26+
or ansible_os_family == "Suse"

tasks/plus/install-plus-linux.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
22
- include_tasks: "{{ role_path }}/tasks/plus/setup-{{ ansible_os_family | lower }}.yml"
3-
when:
4-
- ansible_os_family == "Alpine"
5-
or ansible_os_family == "Debian"
6-
or ansible_os_family == "RedHat"
7-
or ansible_os_family == "Suse"
3+
when: ansible_os_family == "Alpine"
4+
or ansible_os_family == "Debian"
5+
or ansible_os_family == "RedHat"
6+
or ansible_os_family == "Suse"
87

98
- name: "(Install: Linux) Modify Service for Systemd"
109
include_tasks: "{{ role_path }}/tasks/prerequisites/setup-systemd.yml"

tasks/plus/setup-license.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
- name: "(Setup: All OSs Besides Alpine Linux) Setup NGINX Plus License"
33
block:
4-
54
- name: "(Setup: All OSs Besides Alpine Linux) Create SSL Directory"
65
file:
76
path: /etc/ssl/nginx
@@ -15,12 +14,10 @@
1514
loop:
1615
- "{{ nginx_license.certificate }}"
1716
- "{{ nginx_license.key }}"
18-
1917
when: ansible_distribution != "Alpine"
2018

2119
- name: "(Setup: Alpine Linux) Setup NGINX Plus License"
2220
block:
23-
2421
- name: "(Setup: Alpine Linux) Create APK Directory"
2522
file:
2623
path: /etc/apk
@@ -37,5 +34,4 @@
3734
src: "{{ nginx_license.certificate }}"
3835
dest: /etc/apk/cert.pem
3936
decrypt: yes
40-
4137
when: ansible_distribution == "Alpine"

tasks/prerequisites/setup-debian.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
- apt-transport-https
66
- dirmngr
77
- python-apt
8-
update_cache: true
8+
update_cache: yes

0 commit comments

Comments
 (0)