diff --git a/.travis.yml b/.travis.yml index 3a3dfd5..293e0bb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/README.md b/README.md index 02d7ab2..0215c88 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/defaults/main/main.yml b/defaults/main/main.yml index 7d1dbe6..bcb3dec 100644 --- a/defaults/main/main.yml +++ b/defaults/main/main.yml @@ -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 diff --git a/meta/main.yml b/meta/main.yml index 0a3f86e..9dbc293 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -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 diff --git a/molecule/common/Dockerfile.j2 b/molecule/common/Dockerfile.j2 index c268a5b..0f4a8a7 100644 --- a/molecule/common/Dockerfile.j2 +++ b/molecule/common/Dockerfile.j2 @@ -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 \ diff --git a/molecule/common/playbook_default.yml b/molecule/common/playbook_default.yml index 4591f6a..1d57e53 100644 --- a/molecule/common/playbook_default.yml +++ b/molecule/common/playbook_default.yml @@ -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 diff --git a/molecule/common/playbook_default_verifier.yml b/molecule/common/playbook_default_verifier.yml new file mode 100644 index 0000000..f9c8b8a --- /dev/null +++ b/molecule/common/playbook_default_verifier.yml @@ -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: diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index 9a5c3a6..8be12e4 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -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: diff --git a/molecule/module/molecule.yml b/molecule/module/molecule.yml index 2e12f7e..f2676c4 100644 --- a/molecule/module/molecule.yml +++ b/molecule/module/molecule.yml @@ -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: diff --git a/molecule/source/molecule.yml b/molecule/source/molecule.yml index a2028ed..3cadc14 100644 --- a/molecule/source/molecule.yml +++ b/molecule/source/molecule.yml @@ -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: diff --git a/molecule/stable_push/molecule.yml b/molecule/stable_push/molecule.yml index 40c6990..5843bf4 100644 --- a/molecule/stable_push/molecule.yml +++ b/molecule/stable_push/molecule.yml @@ -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: diff --git a/molecule/template/molecule.yml b/molecule/template/molecule.yml index 541fee0..02e90f9 100644 --- a/molecule/template/molecule.yml +++ b/molecule/template/molecule.yml @@ -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: diff --git a/molecule/unit/molecule.yml b/molecule/unit/molecule.yml index 71585a8..46a6cd4 100644 --- a/molecule/unit/molecule.yml +++ b/molecule/unit/molecule.yml @@ -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: diff --git a/tasks/opensource/setup-source.yml b/tasks/opensource/setup-source.yml index f194daf..7b2f6bd 100644 --- a/tasks/opensource/setup-source.yml +++ b/tasks/opensource/setup-source.yml @@ -43,7 +43,7 @@ - name: "(Install: Linux) Install Build Tools - Debian/Ubuntu" package: name: - - python-minimal + - python3-minimal - build-essential - perl - tar