Add support for Ubuntu Focal (#258)

This commit is contained in:
Alessandro Fael Garcia 2020-06-08 15:46:01 +02:00 committed by GitHub
parent 19fcdf0158
commit 55c2f534ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 142 additions and 69 deletions

View File

@ -4,47 +4,65 @@ services:
- docker
jobs:
include:
- name: "Install Specific Version Test - Debian"
env: scenario=default
- name: "Install Specific Version Test - Alpine"
env: scenario=default_alpine
- name: "Install Specific Version Test - CentOS"
env: scenario=default_centos
- name: "Install Modules Test - Debian"
env: scenario=module
- name: "Install Modules Test - Alpine"
env: scenario=module_alpine
- name: "Install Modules Test - CentOS"
env: scenario=module_centos
- name: "Install Stable Branch and Push Configuration Test - Debian"
env: scenario=stable_push
- name: "Install Stable Branch and Push Configuration Test - Alpine"
env: scenario=stable_push_alpine
- name: "Install Stable Branch and Push Configuration Test - CentOS"
env: scenario=stable_push_centos
- name: "Use Template Setting Test - Debian"
env: scenario=template
- name: "Use Template Setting Test - Alpine"
env: scenario=template_alpine
- name: "Use Template Setting Test - CentOS"
env: scenario=template_centos
- name: "Install Unit Test - Debian"
env: scenario=unit
- name: "Install Unit Test - Alpine"
env: scenario=unit_alpine
- name: "Install Unit Test - CentOS"
env: scenario=unit_centos
- name: "Install from Source Test - Debian"
env: scenario=source
- name: "Install from Source Test - Alpine"
env: scenario=source_alpine
- name: "Install from Source Test - CentOS"
env: scenario=source_centos
- name: "Install Specific Version - Debian/Ubuntu"
env:
scenario: default
- name: "Install Specific Version - Alpine"
env:
scenario: default_alpine
- name: "Install Specific Version - CentOS"
env:
scenario: default_centos
- name: "Install Modules - Debian/Ubuntu"
env:
scenario: module
- name: "Install Modules - Alpine"
env:
scenario: module_alpine
- name: "Install Modules - CentOS"
env:
scenario: module_centos
- name: "Install Stable Branch and Push Configuration - Debian/Ubuntu"
env:
scenario: stable_push
- name: "Install Stable Branch and Push Configuration - Alpine"
env:
scenario: stable_push_alpine
- name: "Install Stable Branch and Push Configuration - CentOS"
env:
scenario: stable_push_centos
- name: "Use Template Setting - Debian/Ubuntu"
env:
scenario: template
- name: "Use Template Setting - Alpine"
env:
scenario: template_alpine
- name: "Use Template Setting - CentOS"
env:
scenario: template_centos
- name: "Install Unit - Debian/Ubuntu"
env:
scenario: unit
- name: "Install Unit - Alpine"
env:
scenario: unit_alpine
- name: "Install Unit - CentOS"
env:
scenario: unit_centos
- name: "Install from Source - Debian/Ubuntu"
env:
scenario: source
- name: "Install from Source - Alpine"
env:
scenario: source_alpine
- name: "Install from Source - CentOS"
env:
scenario: source_centos
before_install:
- sudo apt-get -qq update
install:
- pip install ansible==2.9.6
- pip install molecule[docker]>=3.0.0
- pip install ansible==2.9.9
- pip install molecule[docker]==3.0.4
- pip install testinfra
- pip install ansible-lint
- pip install flake8

View File

@ -72,6 +72,7 @@ Ubuntu:
versions:
- xenial
- bionic
- focal
```
**NGINX Plus**
@ -88,7 +89,7 @@ Amazon Linux:
- 2018.03
Amazon Linux 2:
versions:
- LTS
- any
CentOS:
versions:
- 6.5+
@ -119,6 +120,7 @@ Ubuntu:
versions:
- xenial
- bionic
- focal
```
**NGINX Amplify Agent**
@ -148,33 +150,31 @@ RedHat:
**NGINX Unit**
```yaml
CentOS:
versions:
- 6
- 7
RedHat:
versions:
- 6
- 7
Debian:
versions:
- jessie
- stretch
- buster
Ubuntu:
versions:
- xenial
- bionic
Amazon Linux:
versions:
- 2018.03
Amazon Linux 2:
versions:
- 2
FreeBSD:
- any
CentOS:
versions:
- 10
- 11
- 6
- 7
- 8
Debian:
versions:
- stretch
- buster
RedHat:
versions:
- 6
- 7
- 8
Ubuntu:
versions:
- xenial
- bionic
- focal
```
Role Variables

View File

@ -39,7 +39,7 @@ nginx_install_from: nginx_repository
# Options represent whether to install from source also
# or to install from packages (default). These only apply
# if 'nginx_install_from' is set to 'source'
# For the tools, true means we will isntall from a package
# For the tools, true means we will install from a package
# and false means install from source.
# 'nginx_install_source_build_tools' will install compiler
# and build tools from packages. If false, you need to have

View File

@ -11,13 +11,15 @@ galaxy_info:
platforms:
- name: Alpine
versions:
- all
- any
- name: Amazon
versions:
- Candidate
- 2018.03
- name: Amazon Linux 2
versions:
- any
- name: Debian
versions:
- jessie
- stretch
- buster
- name: EL
@ -32,6 +34,7 @@ galaxy_info:
versions:
- xenial
- bionic
- focal
- name: SLES
versions:
- 12

View File

@ -17,7 +17,7 @@ ENV {{ var }} {{ value }}
RUN \
if [ $(command -v apt-get) ]; then \
apt-get update \
&& apt-get install -y python3 sudo bash ca-certificates iproute2 python3-apt aptitude systemd systemd-sysv procps curl \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y python3 sudo bash ca-certificates iproute2 python3-apt aptitude systemd systemd-sysv procps curl \
&& apt-get clean; \
elif [ $(command -v dnf) ]; then \
dnf makecache \

View File

@ -4,15 +4,15 @@
pre_tasks:
- name: "Set repo if Alpine"
set_fact:
version: "=1.17.8-r1"
version: "=1.17.10-r1"
when: ansible_os_family == "Alpine"
- name: "Set repo if Debian"
set_fact:
version: "=1.17.8-1~{{ ansible_distribution_release }}"
version: "=1.17.10-1~{{ ansible_distribution_release }}"
when: ansible_os_family == "Debian"
- name: "Set repo if RedHat"
set_fact:
version: "-1.17.8-1.el{{ ansible_distribution_major_version }}.ngx"
version: "-1.17.10-1.el{{ ansible_distribution_major_version }}.ngx"
when: ansible_os_family == "RedHat"
roles:
- role: ansible-role-nginx

View File

@ -0,0 +1,10 @@
---
- name: Verify
hosts: all
tasks:
- name: "Test NGINX is installed"
assert:
- name: "Test NGINX service is running and enabled"
assert:
- name: "Test NGINX is listening"
assert:

View File

@ -35,6 +35,13 @@ platforms:
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
command: "/sbin/init"
- name: ubuntu-focal
image: ubuntu:focal
dockerfile: ../common/Dockerfile.j2
privileged: true
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
command: "/sbin/init"
provisioner:
name: ansible
playbooks:

View File

@ -35,6 +35,13 @@ platforms:
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
command: "/sbin/init"
- name: ubuntu-focal
image: ubuntu:focal
dockerfile: ../common/Dockerfile.j2
privileged: true
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
command: "/sbin/init"
provisioner:
name: ansible
playbooks:

View File

@ -35,6 +35,13 @@ platforms:
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
command: "/sbin/init"
- name: ubuntu-focal
image: ubuntu:focal
dockerfile: ../common/Dockerfile.j2
privileged: true
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
command: "/sbin/init"
provisioner:
name: ansible
playbooks:

View File

@ -38,6 +38,13 @@ platforms:
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
command: "/sbin/init"
- name: ubuntu-focal
image: ubuntu:focal
dockerfile: ../common/Dockerfile.j2
privileged: true
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
command: "/sbin/init"
provisioner:
name: ansible
playbooks:

View File

@ -38,6 +38,13 @@ platforms:
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
command: "/sbin/init"
- name: ubuntu-focal
image: ubuntu:focal
dockerfile: ../common/Dockerfile.j2
privileged: true
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
command: "/sbin/init"
provisioner:
name: ansible
playbooks:

View File

@ -35,6 +35,13 @@ platforms:
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
command: "/sbin/init"
- name: ubuntu-focal
image: ubuntu:focal
dockerfile: ../common/Dockerfile.j2
privileged: true
volumes:
- "/sys/fs/cgroup:/sys/fs/cgroup:rw"
command: "/sbin/init"
provisioner:
name: ansible
playbooks:

View File

@ -43,7 +43,7 @@
- name: "(Install: Linux) Install Build Tools - Debian/Ubuntu"
package:
name:
- python-minimal
- python3-minimal
- build-essential
- perl
- tar