From ae56780efb7bfabc6047386862452e3c1ceed915 Mon Sep 17 00:00:00 2001 From: Michael Buluma Date: Sun, 11 Sep 2022 15:33:37 +0300 Subject: [PATCH] Ansible 6.0 --- .github/workflows/molecule.yml | 23 +++++++++------ .github/workflows/release_drafter.yml | 3 ++ .gitignore | 1 + .gitlab-ci.yml | 22 ++++++--------- .travis.yml | 29 ------------------- LICENSE | 2 +- meta/preferences.yml | 3 ++ molecule/default/molecule.yml | 40 +++++++++++++++++++++++++++ tasks/main.yml | 2 +- tox.ini | 2 +- 10 files changed, 73 insertions(+), 54 deletions(-) delete mode 100644 .travis.yml diff --git a/.github/workflows/molecule.yml b/.github/workflows/molecule.yml index 7950155..687a6a9 100644 --- a/.github/workflows/molecule.yml +++ b/.github/workflows/molecule.yml @@ -6,11 +6,18 @@ name: Ansible Molecule on: - # Schedule updates (once daily) + # Schedule updates (once weekly) schedule: - - cron: '1 1 * * *' + - cron: '1 1/14 * * 0,6' workflow_dispatch: - push: {branches: ["master", "main"]} + push: + branches: + - master + - main + - testing + paths-ignore: + - '**/README.md' + - '**/CHANGELOG.md' concurrency: group: ${{ github.ref }}-${{ github.workflow }} @@ -37,25 +44,23 @@ jobs: matrix: config: - image: "enterpriselinux" - tag: "latest" + tag: "8" - image: "debian-systemd" tag: "latest" - image: "debian-systemd" tag: "bookworm" - - image: "fedora-systemd" - tag: "34" - image: "fedora-systemd" tag: "35" + - image: "fedora-systemd" + tag: "34" - image: "fedora-systemd" tag: "latest" - image: "docker-ubuntu-systemd" tag: "latest" - - image: "docker-ubuntu-systemd" - tag: "bionic" - image: "docker-ubuntu-systemd" tag: "focal" - image: "docker-ubuntu-systemd" - tag: "jammy" + tag: "bionic" steps: - name: checkout uses: actions/checkout@v3 diff --git a/.github/workflows/release_drafter.yml b/.github/workflows/release_drafter.yml index 4bc6a9e..c65a909 100644 --- a/.github/workflows/release_drafter.yml +++ b/.github/workflows/release_drafter.yml @@ -12,6 +12,9 @@ on: - master - main - testing + paths-ignore: + - '**/README.md' + - '**/CHANGELOG.md' # pull_request event is required only for autolabeler pull_request: # Only following types are handled by the action, but one can default to all as well diff --git a/.gitignore b/.gitignore index ad73ff6..21ed080 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ .tox .cache .DS_Store +./molecule_tests.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a647745..64366bd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,5 @@ --- -image: "buluma/github-action-molecule:4.0.9" +image: "buluma/github-action-molecule:5.0.0" services: - docker:dind @@ -20,25 +20,23 @@ molecule: parallel: matrix: - image: "enterpriselinux" - tag: "latest" + tag: "8" - image: "debian-systemd" tag: "latest" - image: "debian-systemd" tag: "bookworm" - - image: "fedora-systemd" - tag: "34" - image: "fedora-systemd" tag: "35" + - image: "fedora-systemd" + tag: "34" - image: "fedora-systemd" tag: "latest" - image: "docker-ubuntu-systemd" tag: "latest" - - image: "docker-ubuntu-systemd" - tag: "bionic" - image: "docker-ubuntu-systemd" tag: "focal" - image: "docker-ubuntu-systemd" - tag: "jammy" + tag: "bionic" testing: stage: test @@ -52,22 +50,20 @@ testing: parallel: matrix: - image: "enterpriselinux" - tag: "latest" + tag: "8" - image: "debian-systemd" tag: "latest" - image: "debian-systemd" tag: "bookworm" - - image: "fedora-systemd" - tag: "34" - image: "fedora-systemd" tag: "35" + - image: "fedora-systemd" + tag: "34" - image: "fedora-systemd" tag: "latest" - image: "docker-ubuntu-systemd" tag: "latest" - - image: "docker-ubuntu-systemd" - tag: "bionic" - image: "docker-ubuntu-systemd" tag: "focal" - image: "docker-ubuntu-systemd" - tag: "jammy" + tag: "bionic" diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 3fcce0a..0000000 --- a/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ ---- -# -# Ansible managed -# -language: python - -os: linux -dist: xenial - -python: - - "3.9" - -services: - - docker - -cache: - - pip - -install: - - pip install --upgrade pip - - pip install ansible ansible-lint yamllint - -script: - - yamllint . - - ansible-lint - -notifications: - webhooks: https://galaxy.ansible.com/api/v1/notifications/ - email: false diff --git a/LICENSE b/LICENSE index 4dc7005..f36f1a7 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ Apache License - Version 2.0, 07 2022 + Version 2.0, 09 2022 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION diff --git a/meta/preferences.yml b/meta/preferences.yml index e7fdebf..1ae5e1e 100644 --- a/meta/preferences.yml +++ b/meta/preferences.yml @@ -1,2 +1,5 @@ --- +# +# Ansible managed +# tox_parallel: yes diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index 2dd4651..af09d89 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -21,7 +21,47 @@ platforms: - /sys/fs/cgroup:/sys/fs/cgroup:ro privileged: yes pre_build_image: yes + tty: true + environment: + container: docker provisioner: name: ansible + config_options: + defaults: + interpreter_python: auto_legacy_silent + ssh_connection: + pipelining: true verifier: name: ansible +scenario: + create_sequence: + - create + - prepare + check_sequence: + - cleanup + - destroy + - create + - prepare + - converge + - check + - destroy + converge_sequence: + - create + - prepare + - converge + destroy_sequence: + - cleanup + - destroy + test_sequence: + - lint + - cleanup + - destroy + - syntax + - create + - prepare + - converge + - idempotence + - side_effect + - verify + - cleanup + - destroy diff --git a/tasks/main.yml b/tasks/main.yml index 997174e..20cd421 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,7 +1,7 @@ --- # tasks file for ansible_lint -- name: install ansible_lint +- name: Install ansible_lint ansible.builtin.pip: name: "{{ ansible_lint_packages }}" state: present diff --git a/tox.ini b/tox.ini index 1525b79..d9a487a 100644 --- a/tox.ini +++ b/tox.ini @@ -3,7 +3,7 @@ # [tox] minversion = 3.21.4 -envlist = py{310}-ansible-{4,5} +envlist = py{310}-ansible-{4,5,6} skipsdist = true