diff --git a/.github/workflows/molecule-test.yml b/.github/workflows/molecule-test.yml index 7af57ac..8548395 100644 --- a/.github/workflows/molecule-test.yml +++ b/.github/workflows/molecule-test.yml @@ -8,7 +8,7 @@ jobs: fail-fast: false max-parallel: 4 matrix: - molecule_distro: ['centos7', 'centos8', 'ubuntu1804'] + molecule_distro: ['centos7', 'centos8', 'ubuntu1804', 'ubuntu2004'] molecule_playbook: ['playbook-10.yml', 'playbook-11.yml', 'playbook-12.yml'] env: ANSIBLE_CALLBACK_WHITELIST: profile_tasks @@ -22,7 +22,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install molecule docker + pip install ansible-lint flake8 molecule docker - name: Test with molecule run: | molecule test --all diff --git a/README.md b/README.md index 4f40458..4ea1880 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ ansible-role-postgres ![](https://github.com/kevincoakley/ansible-role-postgres/workflows/Molecule%20Test/badge.svg) -Install Postgres 10, 11 or 12. Tested with Postgres 10, 11 and 12 on CentOS 7, CentOS 8 and Ubuntu 18.04. +Install Postgres 10, 11 or 12. Tested with Postgres 10, 11 and 12 on CentOS 7, CentOS 8, Ubuntu 18.04, Ubuntu 20.04. Requirements ------------ diff --git a/meta/main.yml b/meta/main.yml index 479f616..65ede41 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -30,6 +30,7 @@ galaxy_info: - name: Ubuntu versions: - bionic + - focal galaxy_tags: - database diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index ee379ae..08e35dc 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -3,10 +3,11 @@ dependency: name: galaxy driver: name: docker -lint: - name: yamllint - options: - config-file: molecule/default/yaml-lint.yml +lint: | + set -e + yamllint -c molecule/yaml-lint.yml . + ansible-lint + flake8 platforms: - name: instance image: "geerlingguy/docker-${MOLECULE_DISTRO:-centos7}-ansible:latest" diff --git a/molecule/default/yaml-lint.yml b/molecule/yaml-lint.yml similarity index 100% rename from molecule/default/yaml-lint.yml rename to molecule/yaml-lint.yml diff --git a/tasks/Debian.yml b/tasks/Debian.yml index 2285f1c..4c3fc16 100644 --- a/tasks/Debian.yml +++ b/tasks/Debian.yml @@ -1,10 +1,15 @@ --- +- name: Update the apt cache + apt: + update_cache: true + cache_valid_time: 3600 + - name: Install packages required for adding the apt repository package: name: "{{ item }}" state: present with_items: - - gpg + - gpg-agent - name: Add an apt signing key, uses whichever key is at the URL apt_key: