12 Commits

Author SHA1 Message Date
936e547c9a fix(ci)L Molecule unable to find role 🐛 💚
Some checks failed
CI / lint (push) Successful in 36s
CI / Molecule Test (almalinux8) (push) Failing after 4m52s
CI / Molecule Test (almalinux9) (push) Failing after 1m6s
CI / release (push) Has been skipped
CI / notify (push) Has been skipped
2025-04-12 11:46:57 +12:00
b217e25268 fix: Updated dependencies 🐛
Some checks failed
CI / lint (push) Successful in 41s
CI / Molecule Test (almalinux9) (push) Failing after 50s
CI / Molecule Test (almalinux8) (push) Failing after 1m38s
CI / release (push) Has been skipped
CI / notify (push) Has been skipped
2025-04-11 22:49:23 +12:00
d7c732f5d1 fix: Remove additional bugs 🐛
All checks were successful
CI / lint (push) Successful in 27s
CI / Molecule Test (almalinux9) (push) Successful in 1m45s
CI / Molecule Test (almalinux8) (push) Successful in 2m13s
CI / release (push) Successful in 1m10s
CI / notify (push) Successful in 18s
* Fixed missing "
* Fixed error on LXC virtualization with fstab
2025-04-11 22:12:09 +12:00
7858cae385 chore: Added authentication token for ntfy
Some checks failed
CI / lint (push) Successful in 2m3s
CI / Molecule Test (almalinux8) (push) Successful in 2m44s
CI / Molecule Test (almalinux9) (push) Successful in 2m31s
CI / release (push) Successful in 36s
CI / notify (push) Successful in 5s
Regular test / Molecule Test (almalinux8) (push) Failing after 10s
Regular test / Molecule Test (almalinux9) (push) Failing after 5m0s
Regular test / notify (push) Has been skipped
2024-09-05 11:08:03 +12:00
e2e85d3dd7 ci: Scheduled run only once per week
All checks were successful
CI / lint (push) Successful in 1m2s
CI / Molecule Test (almalinux8) (push) Successful in 2m43s
CI / Molecule Test (almalinux9) (push) Successful in 3m2s
CI / release (push) Successful in 22s
CI / notify (push) Successful in 4s
Regular test / Molecule Test (almalinux8) (push) Successful in 4m19s
Regular test / Molecule Test (almalinux9) (push) Successful in 2m25s
Regular test / notify (push) Successful in 8s
2024-05-15 16:53:06 +12:00
ef49eb146d chore: Fix linter error
All checks were successful
CI / lint (push) Successful in 37s
CI / Molecule Test (almalinux8) (push) Successful in 4m12s
CI / Molecule Test (almalinux9) (push) Successful in 4m10s
CI / release (push) Successful in 23s
CI / notify (push) Successful in 7s
Regular test / Molecule Test (almalinux9) (push) Successful in 2m49s
Regular test / Molecule Test (almalinux8) (push) Successful in 3m1s
Regular test / notify (push) Successful in 4s
2024-05-14 17:10:04 +12:00
b2bcbd2bca ci: Updated cron scheduler
Some checks failed
CI / lint (push) Failing after 42s
CI / Molecule Test (almalinux8) (push) Has been skipped
CI / Molecule Test (almalinux9) (push) Has been skipped
CI / release (push) Has been skipped
CI / notify (push) Has been skipped
2024-05-14 17:08:15 +12:00
58d82220c6 ci: Created cron test [skip ci] 2024-05-13 16:46:16 +12:00
1263539af9 chore: update schedule for cron
Some checks failed
CI / Molecule Test (almalinux8) (push) Has been skipped
CI / Molecule Test (almalinux9) (push) Has been skipped
CI / release (push) Has been skipped
CI / lint (push) Failing after 52s
2024-05-13 16:34:13 +12:00
5e354d9fb5 chore: Updated schedule [skip ci] 2024-05-13 16:30:09 +12:00
dac92a402b chore: Add ntfy tasks [skip ci] 2024-05-13 16:28:28 +12:00
b08e31ba85 chore: Add cron schedule
All checks were successful
CI / lint (push) Successful in 48s
CI / Molecule Test (almalinux8) (push) Successful in 3m32s
CI / Molecule Test (almalinux9) (push) Successful in 2m37s
CI / release (push) Successful in 27s
2024-05-13 16:20:50 +12:00
6 changed files with 110 additions and 5 deletions

View File

@@ -81,3 +81,36 @@ jobs:
env:
GITEA_TOKEN: ${{ secrets.G_TOKEN }}
GITEA_HOST: ${{ secrets.G_SERVER_URL}}
notify:
runs-on: ubuntu-latest
needs:
- lint
- molecule
- release
steps:
- name: ntfy-success-notifications
uses: niniyas/ntfy-action@master
if: success()
with:
url: '${{ vars.NTFY_URL }}'
title: Workflow success - ansible-role-common
topic: 'ci-status'
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_TOKEN }}" }'
priority: 4
tags: +1,partying_face,action,successfully,completed
details: Workflow has been successfully completed!
icon: 'https://styles.redditmedia.com/t5_32uhe/styles/communityIcon_xnt6chtnr2j21.png'
image: true
- name: ntfy-failed-notifications
uses: niniyas/ntfy-action@master
if: failure()
with:
url: '${{ vars.NTFY_URL }}'
title: Workflow failed - ansible-role-common
topic: 'ci-status'
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_TOKEN }}" }'
priority: 5
tags: -1,skull,action,failed
details: Workflow has failed!
actions: 'default'

62
.github/workflows/cron.yml vendored Normal file
View File

@@ -0,0 +1,62 @@
name: Regular test
on:
schedule:
- cron: "47 2 * * 0"
jobs:
molecule:
name: Molecule Test
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
os: [almalinux8, almalinux9]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip' # caching pip dependencies
- name: Ensure requirements are installed
run: pip install -r requirements.txt
- name: Run Molecule tests.
run: molecule test
env:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
MOLECULE_DISTRO: ${{ matrix.os }}
notify:
runs-on: ubuntu-latest
needs: molecule
steps:
- name: ntfy-success-notifications
uses: niniyas/ntfy-action@master
if: success()
with:
url: '${{ vars.NTFY_URL }}'
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_TOKEN }}" }'
title: Workflow success - ansible-role-common
topic: 'ci-status'
priority: 4
tags: +1,partying_face,action,successfully,completed
details: Workflow has been successfully completed!
icon: 'https://styles.redditmedia.com/t5_32uhe/styles/communityIcon_xnt6chtnr2j21.png'
image: true
- name: ntfy-failed-notifications
uses: niniyas/ntfy-action@master
if: failure()
with:
url: '${{ vars.NTFY_URL }}'
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_TOKEN }}" }'
title: Workflow failed - ansible-role-common
topic: 'ci-status'
priority: 5
tags: -1,skull,action,failed
details: Workflow has failed!
actions: 'default'

3
.gitignore vendored
View File

@@ -16,3 +16,6 @@ env/
# Do not commit Vault password
.vault_password.txt
# No commit of .secrets (Only for local CI Tests)
.secrets
.vars

View File

@@ -16,6 +16,9 @@ provisioner:
name: ansible
env:
MOLECULE_NO_LOG: true
config_options:
defaults:
roles_path: "$MOLECULE_PROJECT_DIRECTORY/.."
# verifier:
# name: ansible
# lint: |

View File

@@ -1,6 +1,7 @@
ansible-core<2.17
ansible-compat >= 4
molecule[docker]== 24.2.1
ansible-lint==24.2.2
ansible-core==2.16.3
ansible-compat == 25.1.4
molecule==25.3.1
molecule-plugins[docker]==23.7.0
ansible-lint==6.22.2
yamllint==1.35.1
passlib==1.7.4
passlib==1.7.4

View File

@@ -24,7 +24,9 @@ if getent group "{{ admin_group }}" | grep -qw "$(whoami)"; then
#ROOT=`/usr/bin/df / -x fuse.gvfs-fuse-daemon -Ph | /usr/bin/egrep -i 'root|logvol|vda' | awk '{print $4}' | tr -d '\n'`
#HOME=`/usr/bin/df /home -x fuse.gvfs-fuse-daemon -Ph | grep home | awk '{print $4}' | tr -d '\n'`
#BACKUP=`/usr/bin/df -x fuse.gvfs-fuse-daemon -Ph | grep backup | awk '{print $4}' | tr -d '\n'`
if [ -f /etc/fstab ]; then
FILESYSTEMS=`cat /etc/fstab | grep -v '#' | grep -v 'swap' | grep -v 'proc' | awk '{if(NF>0) {print $2}}'`
fi
MEMORY=`/usr/bin/env free -m | /usr/bin/env grep "Mem" | /usr/bin/env awk '{print $2,"-",$3,"-",$4}'`
SWAP=`/usr/bin/env free -m | /usr/bin/env grep "Swap" | /usr/bin/env awk '{print $2,"-",$3,"-",$4}'`
PSA=`/usr/bin/env ps -Afl | /usr/bin/env wc -l`
@@ -90,6 +92,7 @@ for FS in ${FILESYSTEMS}; do
echo -e "$COLOR_COLUMN- ..........$RESET_COLORS..........: $COLOR_VALUE `df -H ${FS} | grep -v 'Filesystem' | grep -v '^[[:space:]]*$' | awk '{print $6 \" \" $4}'` remaining $RESET_COLORS"
done
{% endif %}
"
echo -e "
===========================================================================
"