Skip to content

Commit f40312c

Browse files
committed
Rename modules to use Ansible FQCNs (#500)
1 parent ff7ade6 commit f40312c

File tree

14 files changed

+51
-42
lines changed

14 files changed

+51
-42
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
collections:
33
- name: community.general
4-
version: 4.4.0
4+
version: 4.6.1
55
- name: ansible.posix
66
version: 1.3.0
77
- name: community.docker
8-
version: 2.1.1
8+
version: 2.2.1

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@
44

55
FEATURES:
66

7-
Add Molecule testing infrastructure for RHEL 7/8.
7+
* Add Molecule testing infrastructure for RHEL 7/8.
8+
* Rename all modules to use the fully qualified collection name (FQCN) per Ansible guidelines.
9+
10+
ENHANCEMENTS:
11+
12+
Bump the Ansible `community.general` collection to `4.6.1` and `community.docker` collection to `2.2.1`.
813

914
BUG FIXES:
1015

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ If you wish to install NGINX Plus using this role, you will need to obtain an NG
2525
---
2626
collections:
2727
- name: community.general
28-
version: 4.4.0
28+
version: 4.6.1
2929
- name: ansible.posix
3030
version: 1.3.0
3131
- name: community.docker # Only required if you plan to use Molecule (see below)
32-
version: 2.1.1
32+
version: 2.2.1
3333
```
3434
3535
**Note:** You can alternatively install the Ansible community distribution (what is known as the "old" Ansible) if you don't want to manage individual collections.

meta/main.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,7 @@ galaxy_info:
4747
- server
4848
- development
4949
- install
50+
51+
collections:
52+
- ansible.posix
53+
- community.general

tasks/config/setup-logrotate.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
- name: (Alpine Linux) Install logrotate
3-
apk:
3+
community.general.apk:
44
name: logrotate
55
when: ansible_facts['os_family'] == "Alpine"
66

@@ -19,11 +19,11 @@
1919
- name: (SLES) Set up logrotate
2020
block:
2121
- name: (SLES) Configure logrotate repository
22-
zypper_repository:
22+
community.general.zypper_repository:
2323
repo: https://download.opensuse.org/repositories/openSUSE:Leap:42.1/standard/openSUSE:Leap:42.1.repo
2424

2525
- name: (SLES) Install Logrotate
26-
zypper:
26+
community.general.zypper:
2727
name: logrotate
2828
state: present
2929
when: ansible_facts['os_family'] == "Suse"

tasks/opensource/install-alpine.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
when: nginx_manage_repo | bool
99

1010
- name: (Alpine Linux) {{ nginx_setup | capitalize }} NGINX
11-
apk:
11+
community.general.apk:
1212
name: "nginx{{ (nginx_repository is not defined and nginx_setup != 'uninstall') | ternary('@nginx', '') }}{{ nginx_version | default('') }}"
1313
state: "{{ nginx_state }}"
1414
update_cache: true

tasks/opensource/install-bsd.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717
- name: (FreeBSD) {{ nginx_setup | capitalize }} NGINX
1818
block:
1919
- name: (FreeBSD) {{ nginx_setup | capitalize }} NGINX package
20-
pkgng:
20+
community.general.pkgng:
2121
name: "www/nginx{{ nginx_version | default('') }}"
2222
state: "{{ nginx_state }}"
2323
when: nginx_bsd_install_packages | bool
2424
notify: (Handler) Run NGINX
2525

2626
- name: (FreeBSD) {{ nginx_setup | capitalize }} NGINX port
27-
portinstall:
27+
community.general.portinstall:
2828
name: "www/nginx{{ nginx_version | default('') }}"
2929
use_packages: "{{ nginx_bsd_portinstall_use_packages | default(omit) }}"
3030
state: "{{ nginx_state }}"
@@ -35,15 +35,15 @@
3535
- name: (OpenBSD) {{ nginx_setup | capitalize }} NGINX
3636
block:
3737
- name: (OpenBSD) {{ nginx_setup | capitalize }} NGINX package
38-
openbsd_pkg:
38+
community.general.openbsd_pkg:
3939
name: "nginx{{ nginx_version | default('') }}"
4040
build: false
4141
state: "{{ nginx_state }}"
4242
when: nginx_bsd_install_packages | bool
4343
notify: (Handler) Run NGINX
4444

4545
- name: (OpenBSD) {{ nginx_setup | capitalize }} NGINX port
46-
openbsd_pkg:
46+
community.general.openbsd_pkg:
4747
name: "nginx{{ nginx_version | default('') }}"
4848
build: true
4949
state: "{{ nginx_state }}"

tasks/opensource/install-source.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
update_cache: true
1313

1414
- name: (RHEL 8) Set Python 3 as default
15-
alternatives:
15+
community.general.alternatives:
1616
name: python
1717
path: /usr/bin/python3
1818
link: /usr/bin/python
@@ -60,7 +60,7 @@
6060
when: ansible_facts['os_family'] == "Debian"
6161

6262
- name: (Alpine Linux) Install build tools
63-
apk:
63+
community.general.apk:
6464
name:
6565
- alpine-sdk
6666
- build-base
@@ -118,7 +118,7 @@
118118
- ansible_facts['os_family'] == "Debian"
119119

120120
- name: (Alpine Linux) Install PCRE dependency from package
121-
apk:
121+
community.general.apk:
122122
name: pcre-dev
123123
update_cache: true
124124
when:
@@ -148,11 +148,11 @@
148148
creates: "/tmp/makefile"
149149

150150
- name: Make PCRE dependency
151-
make:
151+
community.general.make:
152152
chdir: "/tmp/{{ pcre_version }}"
153153

154154
- name: Install PCRE dependency
155-
make:
155+
community.general.make:
156156
chdir: "/tmp/{{ pcre_version }}"
157157
target: install
158158
when:
@@ -177,7 +177,7 @@
177177
- ansible_facts['os_family'] == "Debian"
178178

179179
- name: (Alpine Linux) Install ZLib dependency from package
180-
apk:
180+
community.general.apk:
181181
name: zlib-dev
182182
update_cache: true
183183
when:
@@ -207,11 +207,11 @@
207207
creates: "/tmp/makefile"
208208

209209
- name: Make ZLib dependency
210-
make:
210+
community.general.make:
211211
chdir: "/tmp/{{ zlib_version }}"
212212

213213
- name: Install ZLib dependency
214-
make:
214+
community.general.make:
215215
chdir: "/tmp/{{ zlib_version }}"
216216
target: install
217217
when:
@@ -236,7 +236,7 @@
236236
- ansible_facts['os_family'] == "Debian"
237237

238238
- name: (Alpine Linux) Install OpenSSL dependency from package
239-
apk:
239+
community.general.apk:
240240
name: openssl-dev
241241
update_cache: true
242242
when:
@@ -266,11 +266,11 @@
266266
creates: "/tmp/makefile"
267267

268268
- name: Make OpenSSL dependency
269-
make:
269+
community.general.make:
270270
chdir: "/tmp/{{ openssl_version }}"
271271

272272
- name: Install OpenSSL dependency
273-
make:
273+
community.general.make:
274274
chdir: "/tmp/{{ openssl_version }}"
275275
target: install
276276
when:
@@ -344,11 +344,11 @@
344344
register: nginx_configure
345345

346346
- name: Make NGINX
347-
make:
347+
community.general.make:
348348
chdir: "/tmp/{{ nginx_version }}"
349349

350350
- name: Install NGINX
351-
make:
351+
community.general.make:
352352
chdir: "/tmp/{{ nginx_version }}"
353353
target: install
354354

tasks/opensource/install-suse.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
- name: (SLES) {{ (nginx_setup == 'uninstall') | ternary('Remove', 'Configure') }} NGINX repository
3-
zypper_repository:
3+
community.general.zypper_repository:
44
name: "nginx-{{ nginx_branch }}"
55
repo: "{{ nginx_repository | default(nginx_default_repository_suse) }}"
66
state: "{{ (nginx_state == 'uninstall') | ternary('absent', 'present') }}"
77
when: nginx_manage_repo | bool
88

99
- name: (SLES) {{ nginx_setup | capitalize }} NGINX
10-
zypper:
10+
community.general.zypper:
1111
name: "nginx{{ nginx_version | default('') }}"
1212
state: "{{ nginx_state }}"
1313
disable_recommends: false

tasks/plus/install-alpine.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
when: nginx_manage_repo | bool
99

1010
- name: (Alpine Linux) {{ nginx_setup | capitalize }} NGINX Plus
11-
apk:
11+
community.general.apk:
1212
name: "nginx-plus{{ nginx_version | default('') }}"
1313
repository: "{{ nginx_repository | default(nginx_plus_default_repository_alpine) }}"
1414
state: "{{ nginx_state }}"

tasks/plus/install-freebsd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
when: nginx_manage_repo | bool
2424

2525
- name: (FreeBSD) {{ nginx_setup | capitalize }} NGINX Plus
26-
pkgng:
26+
community.general.pkgng:
2727
name: "nginx-plus{{ nginx_version | default('') }}"
2828
state: "{{ nginx_state }}"
2929
when: nginx_license_status is not defined

tasks/plus/install-suse.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
- name: (SLES) {{ nginx_license_status is defined | ternary('Remove', 'Configure') }} NGINX Plus repository
3-
zypper_repository:
3+
community.general.zypper_repository:
44
name: nginx-plus
55
repo: "{{ nginx_repository | default(nginx_plus_default_repository_suse) }}"
66
state: "{{ nginx_license_status | default((nginx_setup == 'uninstall') | ternary('absent', 'present')) }}"
77
when: nginx_manage_repo | bool
88

99
- name: (SLES) {{ nginx_setup | capitalize }} NGINX Plus
10-
zypper:
10+
community.general.zypper:
1111
name: "nginx-plus{{ nginx_version | default('') }}"
1212
state: "{{ nginx_state }}"
1313
update_cache: true

tasks/prerequisites/install-dependencies.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
- name: (Alpine Linux) Install dependencies
3-
apk:
3+
community.general.apk:
44
name: "{{ nginx_alpine_dependencies }}"
55
update_cache: true
66
state: latest # noqa package-latest
@@ -21,7 +21,7 @@
2121
when: ansible_facts['os_family'] == "RedHat"
2222

2323
- name: (SLES) Install dependencies
24-
zypper:
24+
community.general.zypper:
2525
name: "{{ nginx_sles_dependencies }}"
2626
update_cache: true
2727
state: latest # noqa package-latest
@@ -30,13 +30,13 @@
3030
- name: (FreeBSD) Install dependencies
3131
block:
3232
- name: (FreeBSD) Install dependencies using package(s)
33-
pkgng:
33+
community.general.pkgng:
3434
name: "{{ nginx_freebsd_dependencies }}"
3535
state: latest # noqa package-latest
3636
when: nginx_bsd_install_packages | bool
3737

3838
- name: (FreeBSD) Install dependencies using port(s)
39-
portinstall:
39+
community.general.portinstall:
4040
name: "{{ item }}"
4141
use_packages: "{{ nginx_bsd_portinstall_use_packages | default(omit) }}"
4242
state: latest # noqa package-latest

tasks/prerequisites/setup-selinux.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,32 +18,32 @@
1818
when: ansible_facts['os_family'] == "RedHat"
1919

2020
- name: Set SELinux mode to permissive
21-
selinux:
21+
ansible.builtin.selinux:
2222
state: permissive
2323
policy: targeted
2424

2525
- name: Allow SELinux HTTP network connections
26-
seboolean:
26+
ansible.builtin.seboolean:
2727
name: httpd_can_network_connect
2828
state: true
2929
persistent: true
3030

3131
- name: Allow SELinux HTTP network connections
32-
seboolean:
32+
ansible.builtin.seboolean:
3333
name: httpd_can_network_relay
3434
state: true
3535
persistent: true
3636

3737
- name: Allow SELinux TCP connections on specific ports
38-
seport:
38+
community.general.seport:
3939
ports: "{{ nginx_selinux_tcp_ports }}"
4040
proto: tcp
4141
setype: http_port_t
4242
state: present
4343
when: nginx_selinux_tcp_ports is defined
4444

4545
- name: Allow SELinux UDP connections on specific ports
46-
seport:
46+
community.general.seport:
4747
ports: "{{ nginx_selinux_udp_ports }}"
4848
proto: udp
4949
setype: http_port_t
@@ -75,7 +75,7 @@
7575
when: nginx_selinux_module.changed | bool
7676

7777
- name: Set SELinux mode to enforcing
78-
selinux:
78+
ansible.builtin.selinux:
7979
state: enforcing
8080
policy: targeted
8181
when: nginx_selinux_enforcing | bool

0 commit comments

Comments
 (0)