18 Commits

Author SHA1 Message Date
e5e3f88413 fix(ci): Let go-semantic-release get latest drivers from web 🐛 💚
All checks were successful
CI / lint (push) Successful in 52s
CI / Molecule Test (almalinux8) (push) Successful in 1m15s
CI / Molecule Test (almalinux9) (push) Successful in 1m54s
CI / release (push) Successful in 23s
CI / notify (push) Successful in 24s
Regular test / Molecule Test (almalinux8) (push) Successful in 1m19s
Regular test / Molecule Test (almalinux9) (push) Successful in 5m51s
Regular test / notify (push) Successful in 7s
2025-04-14 11:26:55 +12:00
1fedea38e3 fix(ci): try add host /tmp
Some checks failed
CI / lint (push) Successful in 40s
CI / Molecule Test (almalinux9) (push) Successful in 1m15s
CI / Molecule Test (almalinux8) (push) Successful in 1m37s
CI / release (push) Failing after 45s
CI / notify (push) Has been skipped
2025-04-14 11:21:06 +12:00
797824ad76 fix(ci): Added remote_tmp path
Some checks failed
CI / lint (push) Successful in 35s
CI / Molecule Test (almalinux9) (push) Failing after 1m5s
CI / Molecule Test (almalinux8) (push) Successful in 1m25s
CI / release (push) Has been skipped
CI / notify (push) Has been skipped
2025-04-14 11:17:32 +12:00
f80471ad66 fix(ci): See if not reinstall epel allows it to work 🐛
Some checks failed
CI / lint (push) Successful in 35s
CI / Molecule Test (almalinux9) (push) Failing after 1m15s
CI / Molecule Test (almalinux8) (push) Successful in 2m37s
CI / release (push) Has been skipped
CI / notify (push) Has been skipped
2025-04-14 10:48:12 +12:00
f732c1dd54 fix: Don't tweak permissions on resolv.conf etc
Some checks failed
CI / lint (push) Successful in 34s
CI / Molecule Test (almalinux8) (push) Successful in 1m57s
CI / Molecule Test (almalinux9) (push) Failing after 5m6s
CI / release (push) Has been skipped
CI / notify (push) Has been skipped
2025-04-13 22:58:40 +12:00
909e25687d fix(ci): more volume mounts 🐛 💚
Some checks failed
Regular test / Molecule Test (almalinux8) (push) Failing after 4m51s
Regular test / Molecule Test (almalinux9) (push) Failing after 2m38s
Regular test / notify (push) Has been skipped
CI / lint (push) Successful in 1m39s
CI / Molecule Test (almalinux8) (push) Failing after 1m0s
CI / Molecule Test (almalinux9) (push) Successful in 1m51s
CI / release (push) Has been skipped
CI / notify (push) Has been skipped
2025-04-12 11:59:49 +12:00
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
9 changed files with 126 additions and 28 deletions

View File

@@ -5,7 +5,6 @@ on:
- "**"
tags:
- "!**"
jobs:
lint:
runs-on: ubuntu-latest
@@ -61,23 +60,42 @@ jobs:
- molecule
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Install gitea provider for Go Semantic Release
run: |
mkdir -p .semrel/$(go env GOOS)_$(go env GOARCH)/provider-gitea/${GITEA_PROVIDER_VER}/ && \
wget https://github.com/cybercinch/go-semantic-release-provider-gitea/releases/download/v${GITEA_PROVIDER_VER}/go-semantic-release-provider-gitea_v${GITEA_PROVIDER_VER}_linux_amd64 \
-O .semrel/$(go env GOOS)_$(go env GOARCH)/provider-gitea/${GITEA_PROVIDER_VER}/gitea && \
chmod a+x .semrel/$(go env GOOS)_$(go env GOARCH)/provider-gitea/${GITEA_PROVIDER_VER}/gitea
env:
GITEA_PROVIDER_VER: 1.0.11
- run: |
echo "github repo: ${GITHUB_REPOSITORY}"
echo "env vars: $(env)"
- uses: go-semantic-release/action@v1
with:
custom-arguments: --provider=gitea
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

@@ -1,6 +1,8 @@
---
- name: Converge
hosts: all
vars:
ansible_remote_tmp: /tmp/.ansible/tmp
tasks:
- name: "Include common"
include_role:

View File

@@ -8,7 +8,10 @@ platforms:
image: "cybercinch/docker-${MOLECULE_DISTRO:-almalinux8}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
- /sys/fs/cgroup:/sys/fs/cgroup:rw
- /run
- /run/lock
- /tmp
cgroupns_mode: host
privileged: true
pre_build_image: true
@@ -16,6 +19,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

@@ -2,13 +2,13 @@
# tasks file for common role
- include_tasks: networking.yml
- name: Ensure common packages (RHEL)
yum:
name: "{{ common_packages }}"
state: present
enablerepo: epel
when: ansible_distribution != 'OracleLinux'
tags: packages
# - name: Ensure common packages (RHEL)
# yum:
# name: "{{ common_packages }}"
# state: present
# enablerepo: epel
# when: ansible_distribution != 'OracleLinux'
# tags: packages
- name: Ensure common packages (OracleLinux)
yum:

View File

@@ -97,5 +97,8 @@
- /etc/hosts
loop_control:
loop_var: perm_config
when: >
ansible_virtualization_type != "docker"
and ansible_virtualization_type != "container"
changed_when: false
tags: dns

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 "
===========================================================================
"