From 0b25b8b669496399e4657fc54600495c377eb66c Mon Sep 17 00:00:00 2001 From: Mykhailo Nikiforov Date: Sun, 27 Apr 2025 15:06:11 +0300 Subject: [PATCH] feat: add more distros to test the role --- .gitea/workflows/checks-test.yml | 23 +++++++++++++---------- molecule/default/converge.yml | 28 ++++++++++++++-------------- 2 files changed, 27 insertions(+), 24 deletions(-) diff --git a/.gitea/workflows/checks-test.yml b/.gitea/workflows/checks-test.yml index ae8609a..91820da 100644 --- a/.gitea/workflows/checks-test.yml +++ b/.gitea/workflows/checks-test.yml @@ -1,6 +1,6 @@ --- name: checks-test -'on': +"on": pull_request: push: branches: @@ -10,7 +10,7 @@ name: checks-test defaults: run: - working-directory: 'palkx.users' + working-directory: "palkx.users" jobs: lint: @@ -20,17 +20,17 @@ jobs: - name: Checkout the codebase uses: actions/checkout@v4 with: - path: 'palkx.users' + path: "palkx.users" - name: Setup Python 3 uses: actions/setup-python@v5 with: - python-version: '3.x' + python-version: "3.x" - name: Intall test dependencies run: pip3 install yamllint ansible-lint - name: Lint code with yamllint - run: 'yamllint .' + run: "yamllint ." - name: Lint code with yamllint - run: 'ansible-lint --profile production --show-relpath .' + run: "ansible-lint --profile production --show-relpath ." molecule: name: molecule runs-on: ubuntu-latest @@ -39,21 +39,24 @@ jobs: distro: - rockylinux9 - ubuntu2204 + - ubuntu2404 - debian11 + - debian12 + steps: - name: Checkout the codebase uses: actions/checkout@v4 with: - path: 'palkx.users' + path: "palkx.users" - name: Setup Python 3 uses: actions/setup-python@v5 with: - python-version: '3.x' + python-version: "3.x" - name: Intall test dependencies run: pip3 install ansible molecule molecule-plugins[docker] docker - name: Run Molecule tests run: molecule test env: - PY_COLORS: '1' - ANSIBLE_FORCE_COLOR: '1' + PY_COLORS: "1" + ANSIBLE_FORCE_COLOR: "1" MOLECULE_DISTRO: ${{ matrix.distro }} diff --git a/molecule/default/converge.yml b/molecule/default/converge.yml index 4076049..05b4eca 100644 --- a/molecule/default/converge.yml +++ b/molecule/default/converge.yml @@ -45,22 +45,22 @@ vars: users_groups: admin: - gid: 1000 - admin1: gid: 1001 - admin2: + admin1: gid: 1002 - admin3: + admin2: gid: 1003 - admin4: + admin3: gid: 1004 + admin4: + gid: 1005 remote-users: gid: 856 no-gid-group: {} users: admin: shell: /bin/sh - uid: 1000 + uid: 1001 groups: - admin - remote-users @@ -70,10 +70,10 @@ authorized_keys: default: # yamllint disable-line rule:line-length - key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIAxFJolWPmbFVMMyD9kxQb353ngyUsEebgkK9AcnjOI cardno:13_460_390' + key: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIAxFJolWPmbFVMMyD9kxQb353ngyUsEebgkK9AcnjOI cardno:13_460_390" admin1: shell: /bin/sh - uid: 1001 + uid: 1002 groups: - admin1 - remote-users @@ -83,10 +83,10 @@ authorized_keys: default: # yamllint disable-line rule:line-length - key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIAxFJolWPmbFVMMyD9kxQb353ngyUsEebgkK9AcnjOI cardno:13_460_390' + key: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIAxFJolWPmbFVMMyD9kxQb353ngyUsEebgkK9AcnjOI cardno:13_460_390" admin2: shell: /bin/sh - uid: 1002 + uid: 1003 groups: - admin2 - remote-users @@ -96,10 +96,10 @@ authorized_keys: default: # yamllint disable-line rule:line-length - key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIAxFJolWPmbFVMMyD9kxQb353ngyUsEebgkK9AcnjOI cardno:13_460_390' + key: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIAxFJolWPmbFVMMyD9kxQb353ngyUsEebgkK9AcnjOI cardno:13_460_390" admin3: shell: /bin/sh - uid: 1003 + uid: 1004 groups: - admin3 - remote-users @@ -109,7 +109,7 @@ authorized_keys: default: # yamllint disable-line rule:line-length - key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIAxFJolWPmbFVMMyD9kxQb353ngyUsEebgkK9AcnjOI cardno:13_460_390' + key: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIAxFJolWPmbFVMMyD9kxQb353ngyUsEebgkK9AcnjOI cardno:13_460_390" admin4: shell: /bin/bash groups: @@ -121,4 +121,4 @@ authorized_keys: default: # yamllint disable-line rule:line-length - key: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIAxFJolWPmbFVMMyD9kxQb353ngyUsEebgkK9AcnjOI cardno:13_460_390' + key: "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIAxFJolWPmbFVMMyD9kxQb353ngyUsEebgkK9AcnjOI cardno:13_460_390"