Rename modules to use Ansible FQCNs (#500)
This commit is contained in:
parent
ff7ade6f4c
commit
f40312c711
@ -1,8 +1,8 @@
|
|||||||
---
|
---
|
||||||
collections:
|
collections:
|
||||||
- name: community.general
|
- name: community.general
|
||||||
version: 4.4.0
|
version: 4.6.1
|
||||||
- name: ansible.posix
|
- name: ansible.posix
|
||||||
version: 1.3.0
|
version: 1.3.0
|
||||||
- name: community.docker
|
- name: community.docker
|
||||||
version: 2.1.1
|
version: 2.2.1
|
||||||
|
@ -4,7 +4,12 @@
|
|||||||
|
|
||||||
FEATURES:
|
FEATURES:
|
||||||
|
|
||||||
Add Molecule testing infrastructure for RHEL 7/8.
|
* Add Molecule testing infrastructure for RHEL 7/8.
|
||||||
|
* Rename all modules to use the fully qualified collection name (FQCN) per Ansible guidelines.
|
||||||
|
|
||||||
|
ENHANCEMENTS:
|
||||||
|
|
||||||
|
Bump the Ansible `community.general` collection to `4.6.1` and `community.docker` collection to `2.2.1`.
|
||||||
|
|
||||||
BUG FIXES:
|
BUG FIXES:
|
||||||
|
|
||||||
|
@ -25,11 +25,11 @@ If you wish to install NGINX Plus using this role, you will need to obtain an NG
|
|||||||
---
|
---
|
||||||
collections:
|
collections:
|
||||||
- name: community.general
|
- name: community.general
|
||||||
version: 4.4.0
|
version: 4.6.1
|
||||||
- name: ansible.posix
|
- name: ansible.posix
|
||||||
version: 1.3.0
|
version: 1.3.0
|
||||||
- name: community.docker # Only required if you plan to use Molecule (see below)
|
- name: community.docker # Only required if you plan to use Molecule (see below)
|
||||||
version: 2.1.1
|
version: 2.2.1
|
||||||
```
|
```
|
||||||
|
|
||||||
**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.
|
**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.
|
||||||
|
@ -47,3 +47,7 @@ galaxy_info:
|
|||||||
- server
|
- server
|
||||||
- development
|
- development
|
||||||
- install
|
- install
|
||||||
|
|
||||||
|
collections:
|
||||||
|
- ansible.posix
|
||||||
|
- community.general
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
- name: (Alpine Linux) Install logrotate
|
- name: (Alpine Linux) Install logrotate
|
||||||
apk:
|
community.general.apk:
|
||||||
name: logrotate
|
name: logrotate
|
||||||
when: ansible_facts['os_family'] == "Alpine"
|
when: ansible_facts['os_family'] == "Alpine"
|
||||||
|
|
||||||
@ -19,11 +19,11 @@
|
|||||||
- name: (SLES) Set up logrotate
|
- name: (SLES) Set up logrotate
|
||||||
block:
|
block:
|
||||||
- name: (SLES) Configure logrotate repository
|
- name: (SLES) Configure logrotate repository
|
||||||
zypper_repository:
|
community.general.zypper_repository:
|
||||||
repo: https://download.opensuse.org/repositories/openSUSE:Leap:42.1/standard/openSUSE:Leap:42.1.repo
|
repo: https://download.opensuse.org/repositories/openSUSE:Leap:42.1/standard/openSUSE:Leap:42.1.repo
|
||||||
|
|
||||||
- name: (SLES) Install Logrotate
|
- name: (SLES) Install Logrotate
|
||||||
zypper:
|
community.general.zypper:
|
||||||
name: logrotate
|
name: logrotate
|
||||||
state: present
|
state: present
|
||||||
when: ansible_facts['os_family'] == "Suse"
|
when: ansible_facts['os_family'] == "Suse"
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
when: nginx_manage_repo | bool
|
when: nginx_manage_repo | bool
|
||||||
|
|
||||||
- name: (Alpine Linux) {{ nginx_setup | capitalize }} NGINX
|
- name: (Alpine Linux) {{ nginx_setup | capitalize }} NGINX
|
||||||
apk:
|
community.general.apk:
|
||||||
name: "nginx{{ (nginx_repository is not defined and nginx_setup != 'uninstall') | ternary('@nginx', '') }}{{ nginx_version | default('') }}"
|
name: "nginx{{ (nginx_repository is not defined and nginx_setup != 'uninstall') | ternary('@nginx', '') }}{{ nginx_version | default('') }}"
|
||||||
state: "{{ nginx_state }}"
|
state: "{{ nginx_state }}"
|
||||||
update_cache: true
|
update_cache: true
|
||||||
|
@ -17,14 +17,14 @@
|
|||||||
- name: (FreeBSD) {{ nginx_setup | capitalize }} NGINX
|
- name: (FreeBSD) {{ nginx_setup | capitalize }} NGINX
|
||||||
block:
|
block:
|
||||||
- name: (FreeBSD) {{ nginx_setup | capitalize }} NGINX package
|
- name: (FreeBSD) {{ nginx_setup | capitalize }} NGINX package
|
||||||
pkgng:
|
community.general.pkgng:
|
||||||
name: "www/nginx{{ nginx_version | default('') }}"
|
name: "www/nginx{{ nginx_version | default('') }}"
|
||||||
state: "{{ nginx_state }}"
|
state: "{{ nginx_state }}"
|
||||||
when: nginx_bsd_install_packages | bool
|
when: nginx_bsd_install_packages | bool
|
||||||
notify: (Handler) Run NGINX
|
notify: (Handler) Run NGINX
|
||||||
|
|
||||||
- name: (FreeBSD) {{ nginx_setup | capitalize }} NGINX port
|
- name: (FreeBSD) {{ nginx_setup | capitalize }} NGINX port
|
||||||
portinstall:
|
community.general.portinstall:
|
||||||
name: "www/nginx{{ nginx_version | default('') }}"
|
name: "www/nginx{{ nginx_version | default('') }}"
|
||||||
use_packages: "{{ nginx_bsd_portinstall_use_packages | default(omit) }}"
|
use_packages: "{{ nginx_bsd_portinstall_use_packages | default(omit) }}"
|
||||||
state: "{{ nginx_state }}"
|
state: "{{ nginx_state }}"
|
||||||
@ -35,7 +35,7 @@
|
|||||||
- name: (OpenBSD) {{ nginx_setup | capitalize }} NGINX
|
- name: (OpenBSD) {{ nginx_setup | capitalize }} NGINX
|
||||||
block:
|
block:
|
||||||
- name: (OpenBSD) {{ nginx_setup | capitalize }} NGINX package
|
- name: (OpenBSD) {{ nginx_setup | capitalize }} NGINX package
|
||||||
openbsd_pkg:
|
community.general.openbsd_pkg:
|
||||||
name: "nginx{{ nginx_version | default('') }}"
|
name: "nginx{{ nginx_version | default('') }}"
|
||||||
build: false
|
build: false
|
||||||
state: "{{ nginx_state }}"
|
state: "{{ nginx_state }}"
|
||||||
@ -43,7 +43,7 @@
|
|||||||
notify: (Handler) Run NGINX
|
notify: (Handler) Run NGINX
|
||||||
|
|
||||||
- name: (OpenBSD) {{ nginx_setup | capitalize }} NGINX port
|
- name: (OpenBSD) {{ nginx_setup | capitalize }} NGINX port
|
||||||
openbsd_pkg:
|
community.general.openbsd_pkg:
|
||||||
name: "nginx{{ nginx_version | default('') }}"
|
name: "nginx{{ nginx_version | default('') }}"
|
||||||
build: true
|
build: true
|
||||||
state: "{{ nginx_state }}"
|
state: "{{ nginx_state }}"
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
update_cache: true
|
update_cache: true
|
||||||
|
|
||||||
- name: (RHEL 8) Set Python 3 as default
|
- name: (RHEL 8) Set Python 3 as default
|
||||||
alternatives:
|
community.general.alternatives:
|
||||||
name: python
|
name: python
|
||||||
path: /usr/bin/python3
|
path: /usr/bin/python3
|
||||||
link: /usr/bin/python
|
link: /usr/bin/python
|
||||||
@ -60,7 +60,7 @@
|
|||||||
when: ansible_facts['os_family'] == "Debian"
|
when: ansible_facts['os_family'] == "Debian"
|
||||||
|
|
||||||
- name: (Alpine Linux) Install build tools
|
- name: (Alpine Linux) Install build tools
|
||||||
apk:
|
community.general.apk:
|
||||||
name:
|
name:
|
||||||
- alpine-sdk
|
- alpine-sdk
|
||||||
- build-base
|
- build-base
|
||||||
@ -118,7 +118,7 @@
|
|||||||
- ansible_facts['os_family'] == "Debian"
|
- ansible_facts['os_family'] == "Debian"
|
||||||
|
|
||||||
- name: (Alpine Linux) Install PCRE dependency from package
|
- name: (Alpine Linux) Install PCRE dependency from package
|
||||||
apk:
|
community.general.apk:
|
||||||
name: pcre-dev
|
name: pcre-dev
|
||||||
update_cache: true
|
update_cache: true
|
||||||
when:
|
when:
|
||||||
@ -148,11 +148,11 @@
|
|||||||
creates: "/tmp/makefile"
|
creates: "/tmp/makefile"
|
||||||
|
|
||||||
- name: Make PCRE dependency
|
- name: Make PCRE dependency
|
||||||
make:
|
community.general.make:
|
||||||
chdir: "/tmp/{{ pcre_version }}"
|
chdir: "/tmp/{{ pcre_version }}"
|
||||||
|
|
||||||
- name: Install PCRE dependency
|
- name: Install PCRE dependency
|
||||||
make:
|
community.general.make:
|
||||||
chdir: "/tmp/{{ pcre_version }}"
|
chdir: "/tmp/{{ pcre_version }}"
|
||||||
target: install
|
target: install
|
||||||
when:
|
when:
|
||||||
@ -177,7 +177,7 @@
|
|||||||
- ansible_facts['os_family'] == "Debian"
|
- ansible_facts['os_family'] == "Debian"
|
||||||
|
|
||||||
- name: (Alpine Linux) Install ZLib dependency from package
|
- name: (Alpine Linux) Install ZLib dependency from package
|
||||||
apk:
|
community.general.apk:
|
||||||
name: zlib-dev
|
name: zlib-dev
|
||||||
update_cache: true
|
update_cache: true
|
||||||
when:
|
when:
|
||||||
@ -207,11 +207,11 @@
|
|||||||
creates: "/tmp/makefile"
|
creates: "/tmp/makefile"
|
||||||
|
|
||||||
- name: Make ZLib dependency
|
- name: Make ZLib dependency
|
||||||
make:
|
community.general.make:
|
||||||
chdir: "/tmp/{{ zlib_version }}"
|
chdir: "/tmp/{{ zlib_version }}"
|
||||||
|
|
||||||
- name: Install ZLib dependency
|
- name: Install ZLib dependency
|
||||||
make:
|
community.general.make:
|
||||||
chdir: "/tmp/{{ zlib_version }}"
|
chdir: "/tmp/{{ zlib_version }}"
|
||||||
target: install
|
target: install
|
||||||
when:
|
when:
|
||||||
@ -236,7 +236,7 @@
|
|||||||
- ansible_facts['os_family'] == "Debian"
|
- ansible_facts['os_family'] == "Debian"
|
||||||
|
|
||||||
- name: (Alpine Linux) Install OpenSSL dependency from package
|
- name: (Alpine Linux) Install OpenSSL dependency from package
|
||||||
apk:
|
community.general.apk:
|
||||||
name: openssl-dev
|
name: openssl-dev
|
||||||
update_cache: true
|
update_cache: true
|
||||||
when:
|
when:
|
||||||
@ -266,11 +266,11 @@
|
|||||||
creates: "/tmp/makefile"
|
creates: "/tmp/makefile"
|
||||||
|
|
||||||
- name: Make OpenSSL dependency
|
- name: Make OpenSSL dependency
|
||||||
make:
|
community.general.make:
|
||||||
chdir: "/tmp/{{ openssl_version }}"
|
chdir: "/tmp/{{ openssl_version }}"
|
||||||
|
|
||||||
- name: Install OpenSSL dependency
|
- name: Install OpenSSL dependency
|
||||||
make:
|
community.general.make:
|
||||||
chdir: "/tmp/{{ openssl_version }}"
|
chdir: "/tmp/{{ openssl_version }}"
|
||||||
target: install
|
target: install
|
||||||
when:
|
when:
|
||||||
@ -344,11 +344,11 @@
|
|||||||
register: nginx_configure
|
register: nginx_configure
|
||||||
|
|
||||||
- name: Make NGINX
|
- name: Make NGINX
|
||||||
make:
|
community.general.make:
|
||||||
chdir: "/tmp/{{ nginx_version }}"
|
chdir: "/tmp/{{ nginx_version }}"
|
||||||
|
|
||||||
- name: Install NGINX
|
- name: Install NGINX
|
||||||
make:
|
community.general.make:
|
||||||
chdir: "/tmp/{{ nginx_version }}"
|
chdir: "/tmp/{{ nginx_version }}"
|
||||||
target: install
|
target: install
|
||||||
|
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
---
|
---
|
||||||
- name: (SLES) {{ (nginx_setup == 'uninstall') | ternary('Remove', 'Configure') }} NGINX repository
|
- name: (SLES) {{ (nginx_setup == 'uninstall') | ternary('Remove', 'Configure') }} NGINX repository
|
||||||
zypper_repository:
|
community.general.zypper_repository:
|
||||||
name: "nginx-{{ nginx_branch }}"
|
name: "nginx-{{ nginx_branch }}"
|
||||||
repo: "{{ nginx_repository | default(nginx_default_repository_suse) }}"
|
repo: "{{ nginx_repository | default(nginx_default_repository_suse) }}"
|
||||||
state: "{{ (nginx_state == 'uninstall') | ternary('absent', 'present') }}"
|
state: "{{ (nginx_state == 'uninstall') | ternary('absent', 'present') }}"
|
||||||
when: nginx_manage_repo | bool
|
when: nginx_manage_repo | bool
|
||||||
|
|
||||||
- name: (SLES) {{ nginx_setup | capitalize }} NGINX
|
- name: (SLES) {{ nginx_setup | capitalize }} NGINX
|
||||||
zypper:
|
community.general.zypper:
|
||||||
name: "nginx{{ nginx_version | default('') }}"
|
name: "nginx{{ nginx_version | default('') }}"
|
||||||
state: "{{ nginx_state }}"
|
state: "{{ nginx_state }}"
|
||||||
disable_recommends: false
|
disable_recommends: false
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
when: nginx_manage_repo | bool
|
when: nginx_manage_repo | bool
|
||||||
|
|
||||||
- name: (Alpine Linux) {{ nginx_setup | capitalize }} NGINX Plus
|
- name: (Alpine Linux) {{ nginx_setup | capitalize }} NGINX Plus
|
||||||
apk:
|
community.general.apk:
|
||||||
name: "nginx-plus{{ nginx_version | default('') }}"
|
name: "nginx-plus{{ nginx_version | default('') }}"
|
||||||
repository: "{{ nginx_repository | default(nginx_plus_default_repository_alpine) }}"
|
repository: "{{ nginx_repository | default(nginx_plus_default_repository_alpine) }}"
|
||||||
state: "{{ nginx_state }}"
|
state: "{{ nginx_state }}"
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
when: nginx_manage_repo | bool
|
when: nginx_manage_repo | bool
|
||||||
|
|
||||||
- name: (FreeBSD) {{ nginx_setup | capitalize }} NGINX Plus
|
- name: (FreeBSD) {{ nginx_setup | capitalize }} NGINX Plus
|
||||||
pkgng:
|
community.general.pkgng:
|
||||||
name: "nginx-plus{{ nginx_version | default('') }}"
|
name: "nginx-plus{{ nginx_version | default('') }}"
|
||||||
state: "{{ nginx_state }}"
|
state: "{{ nginx_state }}"
|
||||||
when: nginx_license_status is not defined
|
when: nginx_license_status is not defined
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
---
|
---
|
||||||
- name: (SLES) {{ nginx_license_status is defined | ternary('Remove', 'Configure') }} NGINX Plus repository
|
- name: (SLES) {{ nginx_license_status is defined | ternary('Remove', 'Configure') }} NGINX Plus repository
|
||||||
zypper_repository:
|
community.general.zypper_repository:
|
||||||
name: nginx-plus
|
name: nginx-plus
|
||||||
repo: "{{ nginx_repository | default(nginx_plus_default_repository_suse) }}"
|
repo: "{{ nginx_repository | default(nginx_plus_default_repository_suse) }}"
|
||||||
state: "{{ nginx_license_status | default((nginx_setup == 'uninstall') | ternary('absent', 'present')) }}"
|
state: "{{ nginx_license_status | default((nginx_setup == 'uninstall') | ternary('absent', 'present')) }}"
|
||||||
when: nginx_manage_repo | bool
|
when: nginx_manage_repo | bool
|
||||||
|
|
||||||
- name: (SLES) {{ nginx_setup | capitalize }} NGINX Plus
|
- name: (SLES) {{ nginx_setup | capitalize }} NGINX Plus
|
||||||
zypper:
|
community.general.zypper:
|
||||||
name: "nginx-plus{{ nginx_version | default('') }}"
|
name: "nginx-plus{{ nginx_version | default('') }}"
|
||||||
state: "{{ nginx_state }}"
|
state: "{{ nginx_state }}"
|
||||||
update_cache: true
|
update_cache: true
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
- name: (Alpine Linux) Install dependencies
|
- name: (Alpine Linux) Install dependencies
|
||||||
apk:
|
community.general.apk:
|
||||||
name: "{{ nginx_alpine_dependencies }}"
|
name: "{{ nginx_alpine_dependencies }}"
|
||||||
update_cache: true
|
update_cache: true
|
||||||
state: latest # noqa package-latest
|
state: latest # noqa package-latest
|
||||||
@ -21,7 +21,7 @@
|
|||||||
when: ansible_facts['os_family'] == "RedHat"
|
when: ansible_facts['os_family'] == "RedHat"
|
||||||
|
|
||||||
- name: (SLES) Install dependencies
|
- name: (SLES) Install dependencies
|
||||||
zypper:
|
community.general.zypper:
|
||||||
name: "{{ nginx_sles_dependencies }}"
|
name: "{{ nginx_sles_dependencies }}"
|
||||||
update_cache: true
|
update_cache: true
|
||||||
state: latest # noqa package-latest
|
state: latest # noqa package-latest
|
||||||
@ -30,13 +30,13 @@
|
|||||||
- name: (FreeBSD) Install dependencies
|
- name: (FreeBSD) Install dependencies
|
||||||
block:
|
block:
|
||||||
- name: (FreeBSD) Install dependencies using package(s)
|
- name: (FreeBSD) Install dependencies using package(s)
|
||||||
pkgng:
|
community.general.pkgng:
|
||||||
name: "{{ nginx_freebsd_dependencies }}"
|
name: "{{ nginx_freebsd_dependencies }}"
|
||||||
state: latest # noqa package-latest
|
state: latest # noqa package-latest
|
||||||
when: nginx_bsd_install_packages | bool
|
when: nginx_bsd_install_packages | bool
|
||||||
|
|
||||||
- name: (FreeBSD) Install dependencies using port(s)
|
- name: (FreeBSD) Install dependencies using port(s)
|
||||||
portinstall:
|
community.general.portinstall:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
use_packages: "{{ nginx_bsd_portinstall_use_packages | default(omit) }}"
|
use_packages: "{{ nginx_bsd_portinstall_use_packages | default(omit) }}"
|
||||||
state: latest # noqa package-latest
|
state: latest # noqa package-latest
|
||||||
|
@ -18,24 +18,24 @@
|
|||||||
when: ansible_facts['os_family'] == "RedHat"
|
when: ansible_facts['os_family'] == "RedHat"
|
||||||
|
|
||||||
- name: Set SELinux mode to permissive
|
- name: Set SELinux mode to permissive
|
||||||
selinux:
|
ansible.builtin.selinux:
|
||||||
state: permissive
|
state: permissive
|
||||||
policy: targeted
|
policy: targeted
|
||||||
|
|
||||||
- name: Allow SELinux HTTP network connections
|
- name: Allow SELinux HTTP network connections
|
||||||
seboolean:
|
ansible.builtin.seboolean:
|
||||||
name: httpd_can_network_connect
|
name: httpd_can_network_connect
|
||||||
state: true
|
state: true
|
||||||
persistent: true
|
persistent: true
|
||||||
|
|
||||||
- name: Allow SELinux HTTP network connections
|
- name: Allow SELinux HTTP network connections
|
||||||
seboolean:
|
ansible.builtin.seboolean:
|
||||||
name: httpd_can_network_relay
|
name: httpd_can_network_relay
|
||||||
state: true
|
state: true
|
||||||
persistent: true
|
persistent: true
|
||||||
|
|
||||||
- name: Allow SELinux TCP connections on specific ports
|
- name: Allow SELinux TCP connections on specific ports
|
||||||
seport:
|
community.general.seport:
|
||||||
ports: "{{ nginx_selinux_tcp_ports }}"
|
ports: "{{ nginx_selinux_tcp_ports }}"
|
||||||
proto: tcp
|
proto: tcp
|
||||||
setype: http_port_t
|
setype: http_port_t
|
||||||
@ -43,7 +43,7 @@
|
|||||||
when: nginx_selinux_tcp_ports is defined
|
when: nginx_selinux_tcp_ports is defined
|
||||||
|
|
||||||
- name: Allow SELinux UDP connections on specific ports
|
- name: Allow SELinux UDP connections on specific ports
|
||||||
seport:
|
community.general.seport:
|
||||||
ports: "{{ nginx_selinux_udp_ports }}"
|
ports: "{{ nginx_selinux_udp_ports }}"
|
||||||
proto: udp
|
proto: udp
|
||||||
setype: http_port_t
|
setype: http_port_t
|
||||||
@ -75,7 +75,7 @@
|
|||||||
when: nginx_selinux_module.changed | bool
|
when: nginx_selinux_module.changed | bool
|
||||||
|
|
||||||
- name: Set SELinux mode to enforcing
|
- name: Set SELinux mode to enforcing
|
||||||
selinux:
|
ansible.builtin.selinux:
|
||||||
state: enforcing
|
state: enforcing
|
||||||
policy: targeted
|
policy: targeted
|
||||||
when: nginx_selinux_enforcing | bool
|
when: nginx_selinux_enforcing | bool
|
||||||
|
Loading…
Reference in New Issue
Block a user