From 15f58ade733b9700b90eda22d497da87bb80940a Mon Sep 17 00:00:00 2001 From: Michael Buluma Date: Sat, 18 Nov 2023 19:22:36 +0300 Subject: [PATCH] Generated Ansible files --- .ansible-lint | 18 +++++++++--------- .github/ISSUE_TEMPLATE/bug_report.md | 3 +-- .github/ISSUE_TEMPLATE/feature_request.md | 2 +- .github/workflows/galaxy.yml | 3 ++- .github/workflows/molecule.yml | 23 ++++++++++++----------- .github/workflows/requirements2png.yml | 9 +++++---- .github/workflows/todo.yml | 2 +- .gitlab-ci.yml | 12 +++++++----- .pre-commit-config.yaml | 4 ++-- README.md | 8 ++++---- molecule/default/molecule.yml | 1 + requirements.txt | 5 ++--- tox.ini | 7 +++++-- 13 files changed, 52 insertions(+), 45 deletions(-) diff --git a/.ansible-lint b/.ansible-lint index 0cce1c4..fa67b68 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -3,15 +3,15 @@ # Ansible managed # exclude_paths: - - ./meta/preferences.yml - - ./molecule/default/prepare.yml - - ./molecule/default/converge.yml - - ./molecule/default/verify.yml - - ./molecule/default/collections.yml - - ./.tox - - ./.cache - - ./.github - - ./requirements.yml + - meta/preferences.yml + - molecule/default/prepare.yml + - molecule/default/converge.yml + - molecule/default/verify.yml + - molecule/default/collections.yml + - .tox + - .cache + - .github + - requirements.yml skip_list: - yaml[truthy] diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 01ce68e..528b917 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -4,7 +4,7 @@ about: Create a report to help me improve --- -## Describe the bug +# Describe the bug A clear and concise description of what the bug is. @@ -13,7 +13,6 @@ A clear and concise description of what the bug is. Please paste the playbook you are using. (Consider `requirements.yml` and optionally the command you've invoked.) - ```yaml --- YOUR PLAYBOOK HERE diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 83e7a9f..c73a160 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -4,7 +4,7 @@ about: Suggest an idea for this project --- -## Proposed feature +# Proposed feature A clear and concise description of what you want to happen. diff --git a/.github/workflows/galaxy.yml b/.github/workflows/galaxy.yml index 50d85cb..38eca22 100644 --- a/.github/workflows/galaxy.yml +++ b/.github/workflows/galaxy.yml @@ -13,6 +13,7 @@ jobs: runs-on: ubuntu-20.04 steps: - name: galaxy - uses: buluma/galaxy-action@v6.25.22 + # uses: buluma/galaxy-action@v6.25.22 # TODO: rebuild action + uses: robertdebock/galaxy-action@1.2.1 with: galaxy_api_key: ${{ secrets.galaxy_api_key }} diff --git a/.github/workflows/molecule.yml b/.github/workflows/molecule.yml index a7ba202..bc61717 100644 --- a/.github/workflows/molecule.yml +++ b/.github/workflows/molecule.yml @@ -20,6 +20,9 @@ on: schedule: - cron: '29 15 15 * *' + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + concurrency: group: ${{ github.ref }}-${{ github.workflow }} cancel-in-progress: true @@ -29,7 +32,7 @@ jobs: runs-on: ubuntu-20.04 steps: - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: ansible-lint uses: ansible-community/ansible-lint-action@main test: @@ -48,12 +51,8 @@ jobs: tag: "8" - image: "debian-systemd" tag: "latest" - - image: "debian-systemd" - tag: "buster" - image: "debian-systemd" tag: "bullseye" - - image: "fedora-systemd" - tag: "36" - image: "fedora-systemd" tag: "37" - image: "fedora-systemd" @@ -66,19 +65,21 @@ jobs: tag: "focal" - image: "docker-ubuntu-systemd" tag: "bionic" + - image: "docker-ubuntu-systemd" + tag: "lunar" - image: "kali" tag: "latest" steps: - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: "${{ github.repository }}" - - name: disable apparmor for mysql - run: sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ - - name: parse apparmor for mysql - run: sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld + # - name: disable apparmor for mysql + # run: sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/ + # - name: parse apparmor for mysql + # run: sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld - name: molecule - uses: buluma/molecule-action@v5.0.7 + uses: buluma/molecule-action@v5.1.1 with: image: ${{ matrix.config.image }} tag: ${{ matrix.config.tag }} diff --git a/.github/workflows/requirements2png.yml b/.github/workflows/requirements2png.yml index 9a6ac35..a510c4d 100644 --- a/.github/workflows/requirements2png.yml +++ b/.github/workflows/requirements2png.yml @@ -4,8 +4,9 @@ # on: - - push - + push: + paths: + - '.github/workflows/requirements2png.yml' name: Ansible Graphviz jobs: @@ -15,11 +16,11 @@ jobs: contents: write steps: - name: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: ${{ github.repository }} - name: create png - uses: buluma/graphviz-action@1.0.0 # TODO: Update action + uses: buluma/graphviz-action@1.0.0 # TODO: Update action - name: Commit files run: | cd ${{ github.repository }} diff --git a/.github/workflows/todo.yml b/.github/workflows/todo.yml index e6c7007..7837717 100644 --- a/.github/workflows/todo.yml +++ b/.github/workflows/todo.yml @@ -14,7 +14,7 @@ jobs: steps: - uses: "actions/checkout@master" - name: "TODO to Issue" - uses: "alstr/todo-to-issue-action@v2.3" # TODO: Update buluma/todo-to-issue-action@v1.0.1 @buluma + uses: "alstr/todo-to-issue-action@v2.3" # TODO: Update buluma/todo-to-issue-action@v1.0.1 @buluma id: "todo" with: TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9173d70..c0c0a15 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,15 +1,15 @@ --- -image: "buluma/github-action-molecule:5.0.7" +image: "buluma/github-action-molecule:5.1.1" variables: PY_COLORS: 1 molecule: script: - - if [ -f tox.ini ] ; then tox ; fi - - if [ ! -f tox.ini ] ; then molecule test ; fi + - molecule test rules: - if: $CI_COMMIT_REF_NAME == "master" + allow_failure: true parallel: matrix: - image: "alpine-openrc" @@ -20,8 +20,8 @@ molecule: tag: "8" - image: "debian-systemd" tag: "latest" - - image: "fedora-systemd" - tag: "36" + - image: "debian-systemd" + tag: "bullseye" - image: "fedora-systemd" tag: "37" - image: "fedora-systemd" @@ -34,6 +34,8 @@ molecule: tag: "focal" - image: "docker-ubuntu-systemd" tag: "bionic" + - image: "docker-ubuntu-systemd" + tag: "lunar" - image: "kali" tag: "latest" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index eca47de..6f3deda 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,14 +1,14 @@ --- repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.3.0 + rev: v4.4.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer - id: check-added-large-files - repo: https://github.com/adrienverge/yamllint - rev: v1.29.0 + rev: v1.32.0 hooks: - id: yamllint args: [-c=.yamllint] diff --git a/README.md b/README.md index 5898371..265e338 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -# [openssh](#openssh) +# [Ansible role openssh](#openssh) Install and configure openssh on your system. -|GitHub|GitLab|Quality|Downloads|Version|Issues|Pull Requests| -|------|------|-------|---------|-------|------|-------------| -|[![github](https://github.com/buluma/ansible-role-openssh/workflows/Ansible%20Molecule/badge.svg)](https://github.com/buluma/ansible-role-openssh/actions)|[![gitlab](https://gitlab.com/shadowwalker/ansible-role-openssh/badges/master/pipeline.svg)](https://gitlab.com/shadowwalker/ansible-role-openssh)|[![quality](https://img.shields.io/ansible/quality/58009)](https://galaxy.ansible.com/buluma/openssh)|[![downloads](https://img.shields.io/ansible/role/d/58009)](https://galaxy.ansible.com/buluma/openssh)|[![Version](https://img.shields.io/github/release/buluma/ansible-role-openssh.svg)](https://github.com/buluma/ansible-role-openssh/releases/)|[![Issues](https://img.shields.io/github/issues/buluma/ansible-role-openssh.svg)](https://github.com/buluma/ansible-role-openssh/issues/)|[![PullRequests](https://img.shields.io/github/issues-pr-closed-raw/buluma/ansible-role-openssh.svg)](https://github.com/buluma/ansible-role-openssh/pulls/)| +|GitHub|GitLab|Downloads|Version|Issues|Pull Requests| +|------|------|-------|-------|------|-------------| +|[![github](https://github.com/buluma/ansible-role-openssh/workflows/Ansible%20Molecule/badge.svg)](https://github.com/buluma/ansible-role-openssh/actions)|[![gitlab](https://gitlab.com/shadowwalker/ansible-role-openssh/badges/master/pipeline.svg)](https://gitlab.com/shadowwalker/ansible-role-openssh)|[![downloads](https://img.shields.io/ansible/role/d/4787)](https://galaxy.ansible.com/buluma/openssh)|[![Version](https://img.shields.io/github/release/buluma/ansible-role-openssh.svg)](https://github.com/buluma/ansible-role-openssh/releases/)|[![Issues](https://img.shields.io/github/issues/buluma/ansible-role-openssh.svg)](https://github.com/buluma/ansible-role-openssh/issues/)|[![PullRequests](https://img.shields.io/github/issues-pr-closed-raw/buluma/ansible-role-openssh.svg)](https://github.com/buluma/ansible-role-openssh/pulls/)| ## [Example Playbook](#example-playbook) diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index 91e51c9..16d0c96 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -19,6 +19,7 @@ platforms: command: /sbin/init volumes: - /sys/fs/cgroup:/sys/fs/cgroup:rw + cgroupns_mode: host privileged: yes pre_build_image: yes provisioner: diff --git a/requirements.txt b/requirements.txt index 09b3a84..8c938d8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,5 @@ -# Pinning ansible-compat version due to [bug](https://github.com/ansible-community/molecule/issues/3903) -ansible-compat == 3.0.2 -molecule == 5.* +ansible-compat == 4.* +molecule == 6.* molecule-plugins[docker] == 23.* ansible-lint == 6.* paramiko == 3.* diff --git a/tox.ini b/tox.ini index 421fa67..52387a8 100644 --- a/tox.ini +++ b/tox.ini @@ -3,16 +3,19 @@ # [tox] minversion = 4.2.4 -envlist = py{311}-ansible{5,6,7} +# Ansible 6 and 7 are disabled, causing issues with Fedora: +# https://github.com/ansible/ansible/issues/81199#event-9773321055 +# envlist = py3-ansible{6,7,8} +envlist = py3-ansible{8} skipsdist = true [testenv] deps = -rrequirements.txt - ansible5: ansible == 5.* ansible6: ansible == 6.* ansible7: ansible == 7.* + ansible8: ansible == 8.* commands = molecule test setenv = TOX_ENVNAME={envname}