269 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
212e979ec6 fix: Removed additional linebreak 🐛
All checks were successful
CI / lint (push) Successful in 1m31s
CI / Molecule Test (almalinux9) (push) Successful in 2m58s
CI / Molecule Test (almalinux8) (push) Successful in 3m22s
CI / release (push) Successful in 20s
fixes #2
2024-04-26 15:09:00 +12:00
bea07d3c30 fix: Upgrade molecule ⬆️
All checks were successful
CI / lint (push) Successful in 48s
CI / Molecule Test (almalinux9) (push) Successful in 2m13s
CI / Molecule Test (almalinux8) (push) Successful in 2m40s
CI / release (push) Successful in 19s
2024-04-26 11:52:37 +12:00
2412d4dfbb chore: Updated Makefile to use act locally. 👷 🔨
Some checks failed
CI / lint (push) Successful in 46s
CI / Molecule Test (almalinux9) (push) Failing after 51s
CI / Molecule Test (almalinux8) (push) Failing after 53s
CI / release (push) Has been skipped
2024-04-26 11:40:40 +12:00
d39b45290a fix: Updated ansible-lint/yamlint ⬆️ 2024-04-26 11:39:27 +12:00
514defa749 chore: Updated default value 🔧 [skip ci] 2024-04-26 11:37:43 +12:00
7d6e1950d6 chore: Updated Readme.md 🔧 [skip ci] 2024-04-26 11:37:08 +12:00
af2a57fb62 chore: Updated badge on Readme 🔧
All checks were successful
CI / lint (push) Successful in 49s
CI / Molecule Test (almalinux9) (push) Successful in 2m24s
CI / Molecule Test (almalinux8) (push) Successful in 2m28s
CI / release (push) Successful in 20s
2024-04-26 10:49:35 +12:00
c776b9bdab chore: Enable cache 👷
All checks were successful
CI / lint (push) Successful in 36s
CI / Molecule Test (almalinux8) (push) Successful in 2m23s
CI / Molecule Test (almalinux9) (push) Successful in 2m24s
CI / release (push) Successful in 28s
2024-04-26 07:08:33 +12:00
779e10bf4c chore: Removal of unneeded files ⚰️
Some checks failed
CI / Molecule Test (almalinux8) (push) Blocked by required conditions
CI / Molecule Test (almalinux9) (push) Blocked by required conditions
CI / release (push) Blocked by required conditions
CI / lint (push) Has been cancelled
2024-04-24 22:56:53 +12:00
24b1721e8c fix: Further formatting tweaks 🎨
All checks were successful
CI / lint (push) Successful in 58s
CI / Molecule Test (almalinux8) (push) Successful in 2m28s
CI / Molecule Test (almalinux9) (push) Successful in 2m40s
CI / release (push) Successful in 18s
2024-04-24 15:47:25 +12:00
352ea54e11 fix: Correct funky formatting 🎨
All checks were successful
CI / lint (push) Successful in 55s
CI / Molecule Test (almalinux8) (push) Successful in 2m29s
CI / Molecule Test (almalinux9) (push) Successful in 2m40s
CI / release (push) Successful in 20s
2024-04-24 15:30:42 +12:00
6c80c1b07b chore: Lint fixes 🚨
All checks were successful
CI / lint (push) Successful in 35s
CI / Molecule Test (almalinux8) (push) Successful in 2m54s
CI / Molecule Test (almalinux9) (push) Successful in 2m49s
CI / release (push) Successful in 28s
2024-04-24 14:50:04 +12:00
463dfdf732 fix: Don't try add network config no RHEL 🐛
Some checks failed
CI / lint (push) Failing after 1m6s
CI / Molecule Test (almalinux8) (push) Has been skipped
CI / Molecule Test (almalinux9) (push) Has been skipped
CI / release (push) Has been skipped
2024-04-24 14:44:00 +12:00
517ac07529 chore: Updated label 👷 2024-04-24 14:40:43 +12:00
0bf187611a chore: Don't run on tags 👷
All checks were successful
CI / lint (push) Successful in 33s
CI / Molecule Tests ${{ matrix.os }} (almalinux8) (push) Successful in 2m42s
CI / Molecule Tests ${{ matrix.os }} (almalinux9) (push) Successful in 2m50s
CI / release (push) Successful in 18s
2024-04-24 13:38:54 +12:00
a73eb8d69b chore: Add requirements to steps 👷 2024-04-24 13:37:00 +12:00
3b9cff78df chore: Don't re-run on tag push (release) 👷 2024-04-24 13:36:23 +12:00
183d438c06 chore: Bump gitea provider ⬆️
All checks were successful
CI / lint (push) Successful in 36s
CI / Molecule Tests ${{ matrix.os }} (almalinux8) (push) Successful in 2m47s
CI / Molecule Tests ${{ matrix.os }} (almalinux9) (push) Successful in 2m39s
CI / release (push) Successful in 11s
2024-04-24 12:17:54 +12:00
0902ffb768 chore: Bump gitea provider ⬆️
Some checks failed
ci/woodpecker/push/lint Pipeline was successful
CI / lint (push) Successful in 1m14s
ci/woodpecker/push/release/2 Pipeline failed
ci/woodpecker/push/release/1 Pipeline was successful
CI / Molecule Tests ${{ matrix.os }} (almalinux8) (push) Successful in 3m26s
ci/woodpecker/push/release/3 Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
CI / Molecule Tests ${{ matrix.os }} (almalinux9) (push) Successful in 3m16s
ci/woodpecker/push/test/2 Pipeline was successful
ci/woodpecker/push/test/3 Pipeline was successful
ci/woodpecker/push/z.ntfy Pipeline failed
CI / release (push) Successful in 19s
2024-04-24 11:23:27 +12:00
29dc2c1142 fix: Linting errors on CI 🚨
Some checks failed
ci/woodpecker/push/lint Pipeline was successful
CI / lint (push) Successful in 49s
ci/woodpecker/push/release/2 Pipeline failed
CI / Molecule Tests ${{ matrix.os }} (almalinux8) (push) Successful in 3m29s
ci/woodpecker/push/release/1 Pipeline was successful
ci/woodpecker/push/release/3 Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/push/test/3 Pipeline failed
ci/woodpecker/push/test/2 Pipeline failed
ci/woodpecker/push/z.ntfy unknown status
CI / Molecule Tests ${{ matrix.os }} (almalinux9) (push) Successful in 3m15s
CI / release (push) Failing after 16s
2024-04-23 23:07:13 +12:00
86e63365ce fix: Disable cache 👷
Some checks failed
ci/woodpecker/push/lint Pipeline failed
ci/woodpecker/push/release/1 unknown status
ci/woodpecker/push/release/2 unknown status
ci/woodpecker/push/test/1 unknown status
ci/woodpecker/push/release/3 unknown status
ci/woodpecker/push/test/2 unknown status
ci/woodpecker/push/test/3 unknown status
ci/woodpecker/push/z.ntfy unknown status
CI / lint (push) Successful in 48s
CI / Molecule Tests ${{ matrix.os }} (almalinux8) (push) Successful in 3m15s
CI / Molecule Tests ${{ matrix.os }} (almalinux9) (push) Successful in 3m22s
CI / release (push) Failing after 5s
2024-04-23 22:51:46 +12:00
98bd8c9a9e fix: Correct Python version 💚
Some checks failed
ci/woodpecker/push/lint Pipeline failed
ci/woodpecker/push/release/2 unknown status
ci/woodpecker/push/release/1 unknown status
ci/woodpecker/push/release/3 unknown status
ci/woodpecker/push/test/1 unknown status
ci/woodpecker/push/test/2 unknown status
ci/woodpecker/push/test/3 unknown status
ci/woodpecker/push/z.ntfy unknown status
CI / lint (push) Successful in 10m3s
CI / Molecule Tests ${{ matrix.os }} (almalinux8) (push) Failing after 7s
CI / Molecule Tests ${{ matrix.os }} (almalinux9) (push) Failing after 5s
CI / release (push) Failing after 14s
2024-04-23 22:08:59 +12:00
6e7800f161 chore: Update Readme 🔧
Some checks failed
ci/woodpecker/push/lint Pipeline failed
ci/woodpecker/push/release/1 unknown status
ci/woodpecker/push/release/2 unknown status
ci/woodpecker/push/release/3 unknown status
ci/woodpecker/push/test/1 unknown status
ci/woodpecker/push/test/2 unknown status
ci/woodpecker/push/test/3 unknown status
ci/woodpecker/push/z.ntfy unknown status
CI / lint (push) Failing after 26s
CI / Molecule Tests ${{ matrix.os }} (almalinux8) (push) Failing after 5s
CI / Molecule Tests ${{ matrix.os }} (almalinux9) (push) Failing after 5s
CI / release (push) Failing after 14s
2024-04-23 16:57:47 +12:00
65f576a65c feat: Now only issue Dynamic MOTD if in admin_group
Some checks failed
ci/woodpecker/push/lint Pipeline failed
ci/woodpecker/push/release/2 unknown status
ci/woodpecker/push/release/1 unknown status
ci/woodpecker/push/release/3 unknown status
ci/woodpecker/push/test/1 unknown status
ci/woodpecker/push/test/3 unknown status
ci/woodpecker/push/test/2 unknown status
ci/woodpecker/push/z.ntfy unknown status
2024-04-23 16:51:13 +12:00
8e8ea09da4 fix: Added workflow for Actions 👷 2024-04-23 16:50:20 +12:00
ed89133f1b chore: Update README.md [SKIP CI] 📝 2024-04-16 14:42:02 +12:00
ee0b737af7 chore: Update README.md [SKIP CI] 📝 2024-04-16 14:40:45 +12:00
0b1424b9e2 Builds need systemd/cgroups read/write
All checks were successful
ci/woodpecker/manual/lint Pipeline was successful
ci/woodpecker/manual/test/2 Pipeline was successful
ci/woodpecker/manual/test/3 Pipeline was successful
ci/woodpecker/manual/test/1 Pipeline was successful
ci/woodpecker/manual/z.ntfy Pipeline was successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/push/test/3 Pipeline was successful
ci/woodpecker/push/z.ntfy Pipeline was successful
2024-01-04 23:02:52 +13:00
2bf9c2a674 Test Alma 9
Some checks failed
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test/3 Pipeline failed
ci/woodpecker/push/test/2 Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/push/z.ntfy unknown status
2024-01-04 15:53:09 +13:00
1417edf527 fix tag output for ci
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/push/z.ntfy Pipeline was successful
2024-01-04 10:44:09 +13:00
050feb602a Revert all changes
Some checks failed
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/push/z.ntfy Pipeline failed
2024-01-04 10:38:20 +13:00
f24cd077be 1
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful
ci/woodpecker/push/z.ntfy Pipeline was successful
2024-01-03 22:22:03 +13:00
e4d69aaffa Unbump
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/push/z.ntfy Pipeline was successful
2024-01-03 11:55:47 +13:00
2c98ed5c63 Bumper 2024-01-03 11:18:05 +13:00
4fcbdd8147 revert bump
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test/2 Pipeline was successful
ci/woodpecker/push/test/1 Pipeline was successful
ci/woodpecker/push/z.ntfy Pipeline was successful
2024-01-03 00:41:23 +13:00
93a4eac70f boo
Some checks failed
ci/woodpecker/manual/lint Pipeline failed
ci/woodpecker/manual/test/2 unknown status
ci/woodpecker/manual/test/1 unknown status
ci/woodpecker/manual/z.ntfy unknown status
2024-01-02 23:16:38 +13:00
8263f2d4f8 Bump the CI 2024-01-02 23:09:41 +13:00
2c3e2c322e Secret not reqd
All checks were successful
ci/woodpecker/manual/lint Pipeline was successful
ci/woodpecker/manual/test/2 Pipeline was successful
ci/woodpecker/manual/test/1 Pipeline was successful
ci/woodpecker/manual/z.ntfy Pipeline was successful
2024-01-02 23:03:16 +13:00
a0bce37886 [SKIP CI] Update README
All checks were successful
ci/woodpecker/manual/lint Pipeline was successful
ci/woodpecker/manual/test Pipeline was successful
ci/woodpecker/manual/z.ntfy Pipeline was successful
2023-10-19 10:39:34 +13:00
6eebd0b6f6 Secrets not required for this role
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/z.ntfy Pipeline was successful
2023-10-18 22:59:16 +13:00
0b6e1f123a Linted pipeline
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/z.ntfy Pipeline was successful
2023-10-18 22:34:00 +13:00
6e684e6efc Updated pipeline
Some checks failed
ci/woodpecker/push/lint Pipeline failed
ci/woodpecker/push/test unknown status
ci/woodpecker/push/z.ntfy unknown status
2023-10-18 22:29:40 +13:00
0c1ae22375 Update Pipeline
Some checks failed
ci/woodpecker/push/lint Pipeline failed
ci/woodpecker/push/test unknown status
ci/woodpecker/push/z.ntfy unknown status
2023-10-18 22:19:02 +13:00
131b683b49 Copy entire directory
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/z.ntfy Pipeline was successful
2023-10-18 21:57:54 +13:00
682404a819 Add static/dhcp ip helpers for NetworkManager
All checks were successful
ci/woodpecker/manual/lint Pipeline was successful
ci/woodpecker/manual/test Pipeline was successful
ci/woodpecker/manual/z.ntfy Pipeline was successful
2023-10-18 16:58:24 +13:00
a3ee65b213 test
All checks were successful
ci/woodpecker/manual/lint Pipeline was successful
ci/woodpecker/manual/test Pipeline was successful
ci/woodpecker/manual/z.ntfy Pipeline was successful
2023-10-17 09:34:51 +13:00
0118504841 Yamllint fixes
Some checks failed
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/z.failed-ntfy unknown status
ci/woodpecker/push/z.ntfy Pipeline was successful
2023-10-16 22:42:16 +13:00
47e1eaca8b Fix syntax err
Some checks failed
ci/woodpecker/push/lint Pipeline failed
ci/woodpecker/push/test unknown status
ci/woodpecker/push/z.ntfy unknown status
ci/woodpecker/push/z.failed-ntfy Pipeline was successful
2023-10-16 21:55:12 +13:00
6365bf0c00 Test and Lint 2023-10-16 21:52:34 +13:00
5c46cca25c [CHORE] Linting fix
All checks were successful
ci/woodpecker/push/z.cron-ntfy Pipeline was successful
ci/woodpecker/push/z.failed-cron-ntfy Pipeline was successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
2023-10-16 21:45:57 +13:00
70c581f82e Update CI
Some checks failed
ci/woodpecker/push/z.cron-ntfy Pipeline was successful
ci/woodpecker/push/z.failed-cron-ntfy Pipeline was successful
ci/woodpecker/push/lint Pipeline failed
ci/woodpecker/push/test unknown status
2023-10-16 21:42:53 +13:00
83e5a49a28 [SKIP CI] Fix linting 2023-10-16 21:32:53 +13:00
93641c3cf8 [SKIP CI] Fixing line ending removed 2023-10-08 23:21:10 +13:00
b663b49bab [SKIP_CI] Just a test
Some checks failed
ci/woodpecker/push/lint Pipeline failed
ci/woodpecker/push/test unknown status
2023-10-08 23:19:09 +13:00
3ea8059b0f [CI_SKIP] Allow test to work if directory named different
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
2023-10-08 23:03:31 +13:00
e39de4a672 [CI_SKIP] More local linter improvements
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
2023-10-08 22:49:17 +13:00
ba98a986f1 Lint all files when run locally
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
2023-10-08 22:44:43 +13:00
db1e526f0c Make linter a little more strict 2023-10-08 22:44:24 +13:00
303b8d7afb Lint improvements
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
2023-10-08 22:34:46 +13:00
05208e5dae Reformat linter output
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
2023-10-08 22:20:48 +13:00
ab31c5cdcf I want some colour
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
2023-10-08 22:14:19 +13:00
5ad8dde9aa Colored Output
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
2023-10-08 22:03:52 +13:00
0adb495154 [CI SKIP] Updated badge 2023-10-06 07:22:30 +13:00
600f469ca2 Ignore env/directory
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
Add yamllint to "make lint"
2023-10-06 07:17:08 +13:00
97d11bcb87 BUGFIX: Ignore when running in container
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test Pipeline was successful
2023-10-06 07:10:53 +13:00
942fe21aef CHORE: Linting CI Pipeline
Some checks failed
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test Pipeline failed
2023-10-06 07:04:43 +13:00
bd61d62fd6 CHORE: Linting
Some checks failed
ci/woodpecker/push/lint Pipeline failed
ci/woodpecker/push/test unknown status
2023-10-06 07:02:26 +13:00
e2b2acd56a CHORE: Lint fix
Some checks failed
ci/woodpecker/push/lint Pipeline failed
ci/woodpecker/push/test unknown status
2023-10-06 07:00:52 +13:00
19bfcc6eb2 Remove Drone configuration
Some checks failed
ci/woodpecker/push/lint Pipeline failed
ci/woodpecker/push/test unknown status
2023-10-06 06:58:18 +13:00
de589a11e0 Add Makefile 2023-10-06 06:57:52 +13:00
b5db07d6e5 Another to ignore if testing in container
Some checks failed
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test Pipeline failed
2023-10-05 17:38:47 +13:00
5bac53eae1 Don't test if container
Some checks failed
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test Pipeline failed
2023-10-05 17:37:03 +13:00
347faec64c Fix error
Some checks failed
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test Pipeline failed
2023-10-05 17:34:57 +13:00
17329fe030 Test virtualization
Some checks failed
ci/woodpecker/push/lint Pipeline failed
ci/woodpecker/push/test unknown status
2023-10-05 17:33:18 +13:00
344cb5614d Pipeline Fixing
Some checks failed
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/test Pipeline failed
2023-10-05 17:27:36 +13:00
6003d42063 update pipeline
All checks were successful
ci/woodpecker/push/1.lint Pipeline was successful
2023-10-05 17:26:11 +13:00
233b976243 Update pipeline
Some checks failed
ci/woodpecker/push/1.lint Pipeline was successful
ci/woodpecker/push/2.test Pipeline failed
ci/woodpecker/push/1.test Pipeline was successful
2023-10-05 17:19:05 +13:00
5baf0d2d87 Don't lint with molecule
Some checks failed
ci/woodpecker/push/1.test Pipeline was successful
ci/woodpecker/push/2.build Pipeline failed
2023-10-05 17:14:14 +13:00
2d12d58960 Depends syntax
Some checks failed
ci/woodpecker/push/1.test Pipeline was successful
ci/woodpecker/push/2.build Pipeline failed
2023-10-05 17:08:58 +13:00
bc80a57b9c Update Pipeline
All checks were successful
ci/woodpecker/push/1.test Pipeline was successful
2023-10-05 17:07:44 +13:00
7f3147e3ee Update lint pass
All checks were successful
ci/woodpecker/push/1.test Pipeline was successful
2023-10-05 17:06:16 +13:00
e29f5d536d Update linting
Some checks failed
ci/woodpecker/push/1.test Pipeline failed
2023-10-05 16:51:31 +13:00
0af870d440 Fix linting
Some checks failed
ci/woodpecker/push/1.test Pipeline failed
2023-10-05 16:44:41 +13:00
107705b584 Call yamllint with directory
Some checks failed
ci/woodpecker/push/1.test Pipeline failed
2023-10-05 16:43:24 +13:00
6cbcbbad7a Update CI
Some checks failed
ci/woodpecker/push/1.test Pipeline failed
2023-10-05 16:41:38 +13:00
373273dabf .
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
2023-10-05 15:00:38 +13:00
23b9664ede Update CI 2023-10-05 14:32:13 +13:00
00b1548103 axe the backticks
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-08 10:10:44 +13:00
19f54c9f52 Specifically use os-release
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-08 10:02:22 +13:00
1f6b4d51e0 Silence /proc
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-08 07:30:20 +13:00
2652ce3653 Fix output
All checks were successful
continuous-integration/drone Build is passing
2022-11-07 22:45:06 +13:00
0f3221ac3e Fix IP address display
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-06 21:56:55 +13:00
158095b011 lies, again we go
Some checks failed
continuous-integration/drone/push Build was killed
2022-11-02 17:24:56 +13:00
dec7676e87 last test
Some checks failed
continuous-integration/drone/push Build was killed
2022-11-02 17:23:16 +13:00
943aecfe55 Escape the variables
Some checks failed
continuous-integration/drone/push Build was killed
2022-11-02 17:18:50 +13:00
4924606317 ..
Some checks failed
continuous-integration/drone/push Build was killed
2022-11-02 17:14:24 +13:00
41b5efa39b Missing comma again :(
Some checks failed
continuous-integration/drone/push Build was killed
2022-11-02 16:58:11 +13:00
aece1b662a Add echo for testing
Some checks failed
continuous-integration/drone/push Build encountered an error
2022-11-02 16:57:16 +13:00
3cd00a0d1d missing comma
Some checks failed
continuous-integration/drone/push Build was killed
2022-11-02 16:43:55 +13:00
f1999f47f7 echo env
Some checks failed
continuous-integration/drone/push Build encountered an error
2022-11-02 16:42:27 +13:00
0768d5fb3e Added secrets to environment variables
Some checks failed
continuous-integration/drone/push Build was killed
2022-11-02 16:40:15 +13:00
d9e71bec29 Update apk package list
Some checks failed
continuous-integration/drone/push Build was killed
2022-11-02 16:33:54 +13:00
85213537ce Check curl is available
Some checks failed
continuous-integration/drone/push Build was killed
2022-11-02 16:33:26 +13:00
7f616fb5eb Actually exclude the main pipeline
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-02 16:26:29 +13:00
10f03a610b Try triggers
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-02 16:18:25 +13:00
5203103900 Cloning disable jsonnet style
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-02 16:11:33 +13:00
57ab370f92 Stop cloning for notify steps
Some checks failed
continuous-integration/drone/push Build was killed
2022-11-02 16:09:27 +13:00
0a1f4323a3 Image goes on steps (doh)
Some checks failed
continuous-integration/drone/push Build was killed
2022-11-02 16:05:31 +13:00
f6713ff240 Add image
Some checks failed
continuous-integration/drone/push Build was killed
2022-11-02 16:03:52 +13:00
1ef3ba3ca9 Fix permissions
Some checks failed
continuous-integration/drone/push Build was killed
2022-11-02 16:01:57 +13:00
568b6fb667 Ordering fix
Some checks failed
continuous-integration/drone/push Build encountered an error
2022-11-02 16:00:39 +13:00
22d502de50 Update jsonnet
Some checks failed
continuous-integration/drone/push Build encountered an error
2022-11-02 15:59:12 +13:00
b11417540b Add notification on tag
Some checks failed
continuous-integration/drone/push Build was killed
2022-11-02 15:47:23 +13:00
bece894b0d Fix escape sequence
Some checks failed
continuous-integration/drone/push Build was killed
2022-11-02 15:44:46 +13:00
e43f9e0efa add missing comma
Some checks failed
continuous-integration/drone/push Build encountered an error
2022-11-02 15:43:55 +13:00
f19de75deb fix function
Some checks failed
continuous-integration/drone/push Build encountered an error
2022-11-02 15:43:20 +13:00
0c86143b56 Add pipeline for package release
Some checks failed
continuous-integration/drone/push Build encountered an error
2022-11-02 15:42:34 +13:00
c85320a15c Add pipeline for releasing from tag
Some checks failed
continuous-integration/drone/push Build encountered an error
2022-11-02 15:40:29 +13:00
50f0da12d8 damn jsonnet
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-02 15:21:40 +13:00
4b367f73a2 Update pipeline
Some checks failed
continuous-integration/drone/push Build encountered an error
2022-11-02 15:20:00 +13:00
55e2036835 Updated pipeline
Some checks failed
continuous-integration/drone/push Build encountered an error
2022-11-02 15:18:36 +13:00
cdfd7e6193 Remove centos8
Some checks failed
continuous-integration/drone/push Build encountered an error
2022-11-02 15:12:41 +13:00
2cba945d2f [CI SKIP] Exclude tag 2022-11-02 15:00:12 +13:00
0de26dd85e Added loop_controls
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-02 12:07:24 +13:00
fa6e6b9a75 Added loop_control construct
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-02 11:51:16 +13:00
cd70c9ee4d Add loop_control
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-02 11:47:11 +13:00
0314038407 Update fixing deprecation warning
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-01 23:09:42 +13:00
b0d8b5f6b3 [CI SKIP] Updated Readme - added badge 2022-11-01 22:43:29 +13:00
c62950e050 Updated role name
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-01 22:30:13 +13:00
a240a9c85d Updated pipeline
Some checks failed
continuous-integration/drone/push Build was killed
2022-11-01 22:29:23 +13:00
90e6931f17 Different method of listing filesystems
Some checks failed
continuous-integration/drone Build is failing
2022-04-12 22:53:38 +12:00
8bdb2298b3 skip fqcn_builtins 2022-04-03 13:24:08 +12:00
8925c556d6 yamllint fixes 2022-04-03 13:20:47 +12:00
4b41ea1a10 try with boolean 2022-04-02 22:41:07 +13:00
8c9eda04b6 Pull image for task 2022-04-02 22:36:36 +13:00
606e44b9ed Switch to alpine based image 2022-04-02 22:15:36 +13:00
2abad3f994 Disable verifier 2022-04-01 21:51:50 +13:00
4565b3c2c1 don't restrict node label 2022-03-28 23:23:23 +13:00
3cc17e03b7 Don't start runners. Lets autoscale 2022-03-28 23:20:13 +13:00
481e3f018e Wrong quotes used 2022-03-17 22:29:45 +13:00
e521625e4e Fix label definition 2022-03-17 22:27:38 +13:00
e3a6f504a5 Make sure tag is applied 2022-03-17 17:48:25 +13:00
a538a05cdb Remove and re-initialize runners 2022-03-17 17:32:52 +13:00
2d48366a60 sleep to ensure docker runners are up 2022-03-17 17:12:39 +13:00
e60c9499ee fix nodesize 2022-03-17 16:52:36 +13:00
39d5adce58 Update drone config and nodesize 2022-03-17 16:42:41 +13:00
5f5aded32d persist drone.yml 2022-03-17 16:16:01 +13:00
a3c5d6abc2 Apply terraform planned actions 2022-03-17 16:10:07 +13:00
cd446d689b Dummy, mount the volume in container :) 2022-03-17 16:08:09 +13:00
87e7df6a68 Remove erroneus "." 2022-03-17 16:01:52 +13:00
5b3da6675f Update path 2022-03-17 15:59:56 +13:00
38b1ace2d7 Store state on NFS 2022-03-17 15:57:51 +13:00
f0045883c4 Use state file 2022-03-17 15:41:23 +13:00
5967cba0b1 Updated to persist state 2022-03-17 15:40:42 +13:00
ed55c22228 Update to use secrets from drone 2022-03-17 13:23:01 +13:00
dbf1435fd4 Added in Terraform provisioner 2022-03-17 12:09:58 +13:00
fb08a64e88 Name is required 2022-03-15 16:19:35 +13:00
ac4b9d5120 Erroneus comma removal 2022-03-15 16:16:09 +13:00
b76a532eb4 Removed extra name value 2022-03-15 15:19:19 +13:00
a14024dff2 .... 2022-03-15 14:38:46 +13:00
de6761b03a .. 2022-03-15 14:35:29 +13:00
d78de8d8c4 Email notification should be array 2022-03-15 14:19:10 +13:00
71735dac75 steps is also array 2022-03-15 14:18:00 +13:00
7bfc3a9279 Services should be array 2022-03-15 14:16:05 +13:00
2e75a9e505 Fan out/in 2022-03-15 14:04:31 +13:00
07daae1d83 refactor distro substitution to function 2022-03-15 07:46:37 +13:00
e565652503 Fan out/Fan In 2022-03-15 07:14:13 +13:00
fd75e6421c Grub tasks for RHEL > 6 2022-03-14 22:51:48 +13:00
93655e0a3f Merge branch 'master' of bitbucket.org:cybercinch/ansible-role-common 2022-03-14 22:49:45 +13:00
c40fc21029 removed libeselinux-python (Not available RHEL8) 2022-03-14 22:31:52 +13:00
fb48b04840 Allow RHEL 8 installation 2022-03-14 22:24:49 +13:00
96ea18daca Reverted jsonnet conf 2022-03-14 17:08:34 +13:00
372d29435f Revert .drone.jsonnet 2022-03-14 17:05:01 +13:00
f6068fa5fa try import again 2022-03-14 17:02:15 +13:00
2339d13b17 include from project root 2022-03-14 16:31:23 +13:00
499b2c3b2b Unable to import from path 2022-03-14 16:28:59 +13:00
493260028f Corrected filename 2022-03-14 16:25:32 +13:00
b5d64505ea Include from external file. 2022-03-14 16:24:26 +13:00
f11daf186b Corrected distro name 2022-03-14 15:34:17 +13:00
e6c7469fbc Add rocky8 2022-03-14 15:29:51 +13:00
da6c85c5b1 JSONNET updated 2022-03-14 14:58:20 +13:00
cc436f4fb1 ... 2022-03-14 14:45:23 +13:00
92c0aec762 .. 2022-03-14 14:42:46 +13:00
07af261205 Try again 2022-03-14 14:35:54 +13:00
cc3fc78afc Use generated output from JSONNET 2022-03-14 14:26:47 +13:00
27e97ea40a Update JSONNET 2022-03-14 14:18:48 +13:00
93fd1531cb Privileged flag fix 2022-03-14 12:21:32 +13:00
3b0e72a3c3 JSONNET configuration added 2022-03-14 12:18:38 +13:00
6fbdb54e7e This time 2022-03-13 22:12:20 +13:00
78e8cff430 return empty list if not found 2022-03-13 22:07:49 +13:00
c59b7d4c30 Oops, trying to include tasks not vars :( 2022-03-13 22:03:37 +13:00
630c999fe4 Ateempt alternate way to load os family tasks 2022-03-13 21:59:29 +13:00
f55d35ffb4 Use first found - Skipping if file not found 2022-03-13 21:53:44 +13:00
ca8dc0d341 clean out matrix config. Removed from drone 2022-03-11 23:33:45 +13:00
ba5f05e71a . 2022-03-11 23:18:32 +13:00
fddc6ee2a0 fixy 2022-03-11 23:10:34 +13:00
b938cd9032 Matrixify 2022-03-11 23:06:06 +13:00
58c3c49f4f Unbreak the build :) 2022-03-11 22:15:09 +13:00
6af15ed15a Break the build :( 2022-03-11 22:12:35 +13:00
26c2cddc7d Reformatting file 2022-03-11 22:07:40 +13:00
e7f291d124 Linting 2022-03-11 22:02:17 +13:00
1b302d2bec Linting 2022-03-11 21:57:35 +13:00
b741b510b2 Linting fixes 2022-03-11 21:52:23 +13:00
36a71d9fdd Add linting 2022-03-11 21:21:27 +13:00
3a9f50df5f reduce sleep time 2022-03-11 21:13:45 +13:00
0fb9e6903b Added missing handler 2022-03-11 21:02:54 +13:00
167c63676d Add additional handler to check existence 2022-03-11 20:56:33 +13:00
03882dbb91 Fix galaxy schema 2022-03-11 20:47:19 +13:00
558675c92f Fix deprecation warning 2022-03-11 20:40:44 +13:00
dd0af7a031 Updated role metadata 2022-03-11 20:38:26 +13:00
145ae70d3b Fix typo 2022-03-11 20:25:56 +13:00
72012c7236 missing default for root_email 2022-03-11 20:21:44 +13:00
34fba6c48f Root password update fixed 2022-03-11 20:16:09 +13:00
f57a42c942 Skip setting hostname on docker. (Buggy) 2022-03-11 17:11:48 +13:00
526933c3a1 Try Generic 2022-03-11 17:07:32 +13:00
9ca295ff7e Also /etc/resolv.conf :) 2022-03-11 17:00:40 +13:00
cf503b1379 don't mess with /etc/hosts on docker ;) 2022-03-11 16:57:53 +13:00
20d4b14bcf test 2022-03-11 16:40:20 +13:00
c984040564 run centos 7 2022-03-11 16:02:11 +13:00
e844c352bb more sleep again 2022-03-11 15:59:53 +13:00
ce2e71f072 Add more sleep 2022-03-11 15:58:26 +13:00
20cf50a932 . 2022-03-11 15:55:18 +13:00
1843e96509 .. 2022-03-11 15:41:14 +13:00
f1302659c7 . 2022-03-11 15:39:01 +13:00
d3b7f59d42 test default 2022-03-11 15:29:57 +13:00
9524607053 refactor 2022-03-11 15:25:54 +13:00
1078073e10 remove ping 2022-03-11 15:23:20 +13:00
92be1534a8 . 2022-03-11 15:22:54 +13:00
e875f70079 second pipeline 2022-03-11 15:19:42 +13:00
b03d620c53 .. 2022-03-11 15:10:08 +13:00
dc41146319 Remove notification 2022-03-11 15:07:27 +13:00
2241b9e0c7 test 2022-03-11 15:04:34 +13:00
667ab1ef17 . 2022-03-11 14:56:49 +13:00
6ba2eca5c3 .. 2022-03-11 14:56:09 +13:00
36f3e53eec trying notification again 2022-03-11 14:53:52 +13:00
1b10dda692 Use custom image 2022-03-11 14:37:40 +13:00
6a29e9d2b0 .. 2022-03-11 14:20:52 +13:00
935b536535 ... 2022-03-11 14:10:31 +13:00
cde09a554a update galaxy info 2022-03-11 13:02:51 +13:00
89b1b7ccef .. 2022-03-11 12:59:24 +13:00
971fe8a31d update versions 2022-03-11 12:55:21 +13:00
50dc14b912 .. 2022-03-11 12:50:20 +13:00
a101554e25 . 2022-03-11 12:48:35 +13:00
5348eea001 Reformat - need notifications 2022-03-11 12:45:50 +13:00
455f4d9b9a update image 2022-03-11 12:41:16 +13:00
162da91db4 reformat 2022-03-11 12:33:35 +13:00
2f06883974 Try out mail notification 2022-03-11 12:32:15 +13:00
945d1e2dca Add molecule/ansible 2022-03-11 12:22:10 +13:00
fe01bc9a1b Update to drone variables 2022-03-11 12:19:01 +13:00
fccf6923e0 Add in molecule scenario 2022-03-11 12:15:02 +13:00
3282017a2a Add ci file 2022-03-11 11:29:56 +13:00
33 changed files with 877 additions and 306 deletions

6
.ansible-lint Normal file
View File

@@ -0,0 +1,6 @@
profile: basic
skip_list: # or 'skip_list' to silence them completely
- experimental # all rules tagged as experimental
- unnamed-task # All tasks should be named
- fqcn-builtins

101
.github/workflows/ci.yml vendored Normal file
View File

@@ -0,0 +1,101 @@
name: CI
on:
push:
branches:
- "**"
tags:
- "!**"
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- 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: Lint with ansible-lint
run: ansible-lint -c ".ansible-lint"
env:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
- name: Lint with yamllint
run: yamllint .
env:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
molecule:
name: Molecule Test
runs-on: ubuntu-latest
needs: lint
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 }}
release:
runs-on: ubuntu-latest
needs:
- lint
- molecule
steps:
- uses: actions/checkout@v4
- 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'

6
.gitignore vendored
View File

@@ -5,13 +5,17 @@
*.idea
# Ignore any retry files from ansible
*.retry
*/.terraform
# Ignore roles
roles/*
!roles/.gitkeep
!files/authorized_keys/
files/authorized_keys/*
!files/authorized_keys/.gitkeep
env/
# Do not commit Vault password
.vault_password.txt
# No commit of .secrets (Only for local CI Tests)
.secrets
.vars

28
.woodpecker/cron.yml Normal file
View File

@@ -0,0 +1,28 @@
matrix:
include:
- MOLECULE_DISTRO: centos7
- MOLECULE_DISTRO: almalinux8
clone:
git:
image: woodpeckerci/plugin-git
settings:
recursive: true
submodule_update_remote: true
when:
event: [ cron ]
steps:
test:
name: Test on ${MOLECULE_DISTRO}
image: guisea/ansible-molecule
pull: true
environment:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
volumes:
- /var/run/docker.sock:/var/run/docker.sock
commands:
- molecule test --scenario-name ${MOLECULE_SCENARIO:-default}
when:
event: [ cron ]

43
.woodpecker/lint.yml Normal file
View File

@@ -0,0 +1,43 @@
clone:
git:
image: woodpeckerci/plugin-git
settings:
recursive: true
submodule_update_remote: true
when:
event: [ push, manual ]
steps:
ansible-lint:
group: test
name: "Lint: Ansible-lint"
image: guisea/ansible-molecule
environment:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
commands:
- ansible-lint -c ".ansible-lint"
when:
event: [ push, manual ]
yamllint:
group: test
name: "Lint: Yamllint"
image: guisea/ansible-molecule
commands:
- yamllint -f colored .
when:
event: [ push, manual ]
ntfy:
image: codeberg.org/l-x/woodpecker-ntfy
settings:
url: https://ntfy.cybercinch.nz/ci-status
title: "Lint failed for ${CI_REPO_NAME}"
priority: urgent
icon: https://woodpecker-ci.org/img/logo.svg
tags: robot,warning,rotating_light,${CI_BUILD_EVENT},${CI_REPO_NAME}
message: >
📝 Commit by ${CI_COMMIT_AUTHOR} on ${CI_COMMIT_BRANCH}:
${CI_COMMIT_MESSAGE}
when:
event: [ push, manual ]
status: [ failure ]

48
.woodpecker/release.yml Normal file
View File

@@ -0,0 +1,48 @@
matrix:
include:
- MOLECULE_DISTRO: centos7
- MOLECULE_DISTRO: almalinux8
- MOLECULE_DISTRO: almalinux9
clone:
git:
image: woodpeckerci/plugin-git
settings:
recursive: true
submodule_update_remote: true
when:
event: [ push ]
steps:
create-release:
name: Test on ${MOLECULE_DISTRO}
image: guisea/ansible-molecule
pull: true
environment:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
volumes:
- /var/run/docker.sock:/var/run/docker.sock
commands:
- molecule test --scenario-name ${MOLECULE_SCENARIO:-default}
#secrets: [ auth_duo_host, auth_duo_ikey, auth_duo_skey, auth_duo_mirror_url ]
when:
event:
- push
- manual
ntfy:
image: codeberg.org/l-x/woodpecker-ntfy
settings:
url: https://ntfy.cybercinch.nz/ci-status
title: "Test failed for ${CI_REPO_NAME} - Distro: ${MOLECULE_DISTRO} Scenario: ${MOLECULE_SCENARIO:-default}"
priority: urgent
icon: https://woodpecker-ci.org/img/logo.svg
tags: robot,warning,rotating_light,${CI_BUILD_EVENT},${CI_REPO_NAME}
message: >
📝 Commit by ${CI_COMMIT_AUTHOR} on ${CI_COMMIT_BRANCH}:
${CI_COMMIT_MESSAGE}
when:
event: [ push, manual ]
status: [ failure ]
depends_on:
- lint

48
.woodpecker/test.yml Normal file
View File

@@ -0,0 +1,48 @@
matrix:
include:
- MOLECULE_DISTRO: centos7
- MOLECULE_DISTRO: almalinux8
- MOLECULE_DISTRO: almalinux9
clone:
git:
image: woodpeckerci/plugin-git
settings:
recursive: true
submodule_update_remote: true
when:
event: [ push, manual ]
steps:
test:
name: Test on ${MOLECULE_DISTRO}
image: guisea/ansible-molecule
pull: true
environment:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
volumes:
- /var/run/docker.sock:/var/run/docker.sock
commands:
- molecule test --scenario-name ${MOLECULE_SCENARIO:-default}
#secrets: [ auth_duo_host, auth_duo_ikey, auth_duo_skey, auth_duo_mirror_url ]
when:
event:
- push
- manual
ntfy:
image: codeberg.org/l-x/woodpecker-ntfy
settings:
url: https://ntfy.cybercinch.nz/ci-status
title: "Test failed for ${CI_REPO_NAME} - Distro: ${MOLECULE_DISTRO} Scenario: ${MOLECULE_SCENARIO:-default}"
priority: urgent
icon: https://woodpecker-ci.org/img/logo.svg
tags: robot,warning,rotating_light,${CI_BUILD_EVENT},${CI_REPO_NAME}
message: >
📝 Commit by ${CI_COMMIT_AUTHOR} on ${CI_COMMIT_BRANCH}:
${CI_COMMIT_MESSAGE}
when:
event: [ push, manual ]
status: [ failure ]
depends_on:
- lint

View File

@@ -0,0 +1,16 @@
skip_clone: true
steps:
ntfy-success:
image: codeberg.org/l-x/woodpecker-ntfy
settings:
url: https://ntfy.cybercinch.nz/ci-status
title: Build succeeded on ${CI_REPO_NAME}
priority: urgent
icon: https://woodpecker-ci.org/img/logo.svg
tags: robot,white_check_mark,${CI_BUILD_EVENT},${CI_REPO_NAME}
message: >
Test success when run by cron for ${CI_REPO_NAME}.
depends_on:
- "cron"
runs_on: [ success ]

20
.woodpecker/z.ntfy.yml Normal file
View File

@@ -0,0 +1,20 @@
skip_clone: true
steps:
ntfy:
image: codeberg.org/l-x/woodpecker-ntfy
settings:
url: https://ntfy.cybercinch.nz/ci-status
title: "Build completed for ${CI_REPO_NAME}"
priority: urgent
icon: https://woodpecker-ci.org/img/logo.svg
tags: robot,tada,white_check_mark,${CI_BUILD_EVENT},${CI_REPO_NAME}
message: >
📝 Commit by ${CI_COMMIT_AUTHOR} on ${CI_COMMIT_BRANCH}:
${CI_COMMIT_MESSAGE}
when:
event: [ push, manual ]
status: [ success ]
depends_on:
- lint
- test

View File

@@ -0,0 +1,16 @@
skip_clone: true
steps:
ntfy-failed:
image: codeberg.org/l-x/woodpecker-ntfy
settings:
url: https://ntfy.cybercinch.nz/ci-status
title: Build failed on ${CI_REPO_NAME}
priority: urgent
icon: https://woodpecker-ci.org/img/logo.svg
tags: robot,rotating_light,no_entry,${CI_BUILD_EVENT},${CI_REPO_NAME}
message: >
Test failed when run by cron for ${CI_REPO_NAME}.
depends_on:
- "cron"
runs_on: [ failure ]

35
.yamllint Normal file
View File

@@ -0,0 +1,35 @@
---
# Based on ansible-lint config
extends: default
ignore: |
.venv/
rules:
braces:
max-spaces-inside: 1
level: error
brackets:
max-spaces-inside: 1
level: error
colons:
max-spaces-after: -1
level: error
commas:
max-spaces-after: -1
level: error
comments: disable
comments-indentation: disable
document-start: disable
empty-lines:
max: 3
level: error
hyphens:
level: error
indentation: disable
key-duplicates: enable
line-length: disable
new-line-at-end-of-file: enable
new-lines:
type: unix
trailing-spaces: enable
truthy: disable

36
Makefile Normal file
View File

@@ -0,0 +1,36 @@
.PHONY: clean virtualenv lint test docker dist dist-upload
clean:
find . -name '*.py[co]' -delete
virtualenv:
virtualenv --prompt '|> ansible-role-common <| ' .venv
.venv/bin/pip install --upgrade pip
.venv/bin/pip install -r requirements.txt
.venv/bin/ansible-galaxy collection install -r requirements.yml
@echo
@echo "VirtualENV Setup Complete. Now run: source .venv/bin/activate"
@echo
test:
for distro in almalinux9 ; do \
MOLECULE_DISTRO=$$distro molecule test --all ; \
done
lint:
@echo "Linting"
@act -j lint
@echo
docker: clean
docker buildx build --platform 'linux/amd64,linux/arm64' --push \
-t hub.cybercinch.nz/cybercinch/imap_retention_manager:latest \
-t docker.io/cybercinch/imap_retention_manager:latest .
dist: clean
rm -rf dist/*
python setup.py sdist
python setup.py bdist_wheel
dist-upload:
twine upload dist/*

View File

@@ -1,38 +1,89 @@
Role Name
# Common [![status-badge](https://hub.cybercinch.nz/cybercinch/ansible-role-common/actions/workflows/ci.yml/badge.svg)](https://hub.cybercinch.nz/cybercinch/ansible-role-common/actions?workflow=ci.yml)
=========
A brief description of the role goes here.
This role is a collection of functionality to ease common setup of Linux based VM's. Some functionality for windows servers is available.
Requirements
Features:
* Dynamic motd - This displays information to administrators at login.
* Helper commands - These are commands to help with online resizing of Linux Partitions/Drives when running on VMWare.
* Set DNS resolvers for use on the host.
* Install common packages for the host (Win/Linux)
Requirements
------------
Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required.
Nil
Role Variables
--------------
A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.
Role variables can be found in defaults/main.yml
```yaml
domain: exampledomain.com
ad_domain_joined: no
win_timezone: New Zealand Standard Time
vendors_hosts: []
dns_servers:
- 1.0.0.1
- 1.1.1.1
admin_group: admins
common_grub_timeout: 5
postfix_configure: false
common_packages: # Packages we will/would like to install
- nano
- git
- htop
- atop
- wget
- bind-utils
- yum-utils
- unzip
win_packages:
- notepadplusplus.install
- firefoxesr
- baretail
- 7zip.install
apply_win_updates: false
common_show_ipv6: false|bool
common_root_pwd: $y0urp@$$ ## You should always use a vault encrypted string here.
common_root_email: admin@somplace.co.nz # Configures forwarding address for root.
```
Dependencies
------------
A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.
Nil external dependencies. Requires only builtin functions
Example Playbook
----------------
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
This is an example playbook. Executes the role overriding two variables.
- hosts: servers
You could alternately set these in host_vars or group_vars:
```yaml
- hosts: server
roles:
- { role: username.rolename, x: 42 }
- { role: cybercinch.common,
common_show_ipv6: true,
common_root_email: iamroot@example.com }
```
License
-------
BSD
MIT
Author Information
------------------
An optional section for the role authors to include contact information, or a website (HTML is not allowed).
This role was created in 2017 by [Aaron Guise](https://guise.net.nz/)

View File

@@ -1,5 +1,4 @@
---
# defaults file for guisea.common
domain: exampledomain.com
ad_domain_joined: no
win_timezone: New Zealand Standard Time
@@ -9,15 +8,13 @@ dns_servers:
- 1.0.0.1
- 1.1.1.1
ADMIN_GROUP: admins
admin_group: admins
common_grub_timeout: 5
postfix_configure: false
common_packages:
- libselinux-python
- MySQL-python
- nano
- git
- htop
@@ -26,13 +23,15 @@ common_packages:
- bind-utils
- yum-utils
- unzip
win_packages:
- notepadplusplus.install
- firefoxesr
- baretail
- 7zip.install
apply_win_updates: false
common_show_ipv6: false|bool
common_show_ipv6: false|bool
common_root_pwd: $y0urp@$$
common_root_email: admin@somplace.co.nz

View File

@@ -0,0 +1,8 @@
#!/bin/bash
# This script will reset the IP Address back to default of DHCP
# helpful for a pending restore
/bin/nmcli c m "System eth0" ipv4.method auto
/bin/nmcli c m "System eth0" ipv4.address "" ipv4.gateway ""
/bin/nmcli connection up "System eth0"

View File

@@ -0,0 +1,48 @@
#!/bin/bash
# get subnet
subnet=$(ip a | grep "inet " | tail -1 | awk '{print $2}')
# get router/gateway
router=$(ip route show | head -1 | awk '{print $3}')
# get size of network portion of address in bytes
sz=$(echo $subnet | awk -F / '{print $2}')
bytes=$(("$sz" / 8))
prefix=$(echo "$subnet" | cut -d. -f1-$bytes) # e.g., 192.168.0
# get IP address to be set
IP=$(hostname -I | awk '{print $1}') # current IP
echo -n "Keep IP address?—$IP [yn]> "
read -r ans
if [ "$ans" == "n" ]; then
echo -n "Enter new IP address: "
read -r IP
# check if specified IP is properly formatted
if [[ ! $IP =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
echo Invalid IP
fi
# check if specified IP works for local network
if [[ ! $IP =~ ^$prefix ]]; then
echo "ERROR: Specified IP not usable for local network"
exit
fi
fi
# check if specified IP is properly formatted
if [[ ! $IP =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
echo Invalid IP
fi
# fetch the UUID
UUID=$(nmcli connection show | tail -1 | awk '{print $4}')
if [[ "$UUID" == "ethernet" ]]; then
# This is the other format of nmcli connection show
UUID=$(nmcli connection show | head -2 | tail -1 | awk '{print $3}')
fi
# run commands to set up the permanent IP address
nmcli connection modify "$UUID" IPv4.address "$IP"/"$sz"
nmcli connection modify "$UUID" IPv4.gateway "$router"
nmcli connection modify "$UUID" IPv4.method manual
nmcli connection up "$UUID"

View File

@@ -1,27 +1,33 @@
---
# handlers file for guisea.common
- name: Restart Postfix
service:
service:
name: postfix
state: reloaded
- name: Restart SSH
service:
name: sshd
state: restarted
- name: Restart NTPD
service:
name: ntpd
state: restarted
- name: reboot windows
- name: Reboot Windows
win_reboot:
- name: restart NetworkManager
- name: Restart NetworkManager
service:
name: NetworkManager
state: restarted
- name: Check if grub.cfg exists
stat:
path: /boot/grub2/grub.cfg
register: grub_cfg
- name: Update GRUB
command: /usr/sbin/grub2-mkconfig -o /boot/grub2/grub.cfg
when: grub_cfg.stat.exists

View File

@@ -1,152 +1,17 @@
---
galaxy_info:
author: your name
description:
company: your company (optional)
# If the issue tracker for your role is not on github, uncomment the
# next line and provide a value
# issue_tracker_url: http://example.com/issue/tracker
# Some suggested licenses:
# - BSD (default)
# - MIT
# - GPLv2
# - GPLv3
# - Apache
# - CC-BY
license: license (GPLv2, CC-BY, etc)
min_ansible_version: 1.2
#
# Below are all platforms currently available. Just uncomment
# the ones that apply to your role. If you don't see your
# platform on this list, let us know and we'll get it added!
#
#platforms:
#- name: EL
# versions:
# - all
# - 5
# - 6
# - 7
#- name: GenericUNIX
# versions:
# - all
# - any
#- name: Solaris
# versions:
# - all
# - 10
# - 11.0
# - 11.1
# - 11.2
# - 11.3
#- name: Fedora
# versions:
# - all
# - 16
# - 17
# - 18
# - 19
# - 20
# - 21
# - 22
# - 23
#- name: Windows
# versions:
# - all
# - 2012R2
#- name: SmartOS
# versions:
# - all
# - any
#- name: opensuse
# versions:
# - all
# - 12.1
# - 12.2
# - 12.3
# - 13.1
# - 13.2
#- name: Amazon
# versions:
# - all
# - 2013.03
# - 2013.09
#- name: GenericBSD
# versions:
# - all
# - any
#- name: FreeBSD
# versions:
# - all
# - 10.0
# - 10.1
# - 10.2
# - 8.0
# - 8.1
# - 8.2
# - 8.3
# - 8.4
# - 9.0
# - 9.1
# - 9.1
# - 9.2
# - 9.3
#- name: Ubuntu
# versions:
# - all
# - lucid
# - maverick
# - natty
# - oneiric
# - precise
# - quantal
# - raring
# - saucy
# - trusty
# - utopic
# - vivid
#- name: SLES
# versions:
# - all
# - 10SP3
# - 10SP4
# - 11
# - 11SP1
# - 11SP2
# - 11SP3
#- name: GenericLinux
# versions:
# - all
# - any
#- name: Debian
# versions:
# - all
# - etch
# - jessie
# - lenny
# - squeeze
# - wheezy
#
# Below are all categories currently available. Just as with
# the platforms above, uncomment those that apply to your role.
#
#categories:
#- cloud
#- cloud:ec2
#- cloud:gce
#- cloud:rax
#- clustering
#- database
#- database:nosql
#- database:sql
#- development
#- monitoring
#- networking
#- packaging
#- system
#- web
author: guisea <aaron@guise.net.nz>
role_name: common # if absent directory name hosting role is used instead
namespace: cybercinch # if absent, author is used instead
description: Commonplace system setup
company: CyberCinch
license: MIT
min_ansible_version: "2.9"
platforms:
- name: EL
versions:
- all
galaxy_tags: []
dependencies: []
# List your role dependencies here, one per line.
# Be sure to remove the '[]' above if you add dependencies
# to this list.

View File

@@ -0,0 +1,9 @@
---
- name: Converge
hosts: all
vars:
ansible_remote_tmp: /tmp/.ansible/tmp
tasks:
- name: "Include common"
include_role:
name: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') | basename }}"

View File

@@ -0,0 +1,30 @@
---
dependency:
name: galaxy
driver:
name: docker
platforms:
- name: molecule-${MOLECULE_DISTRO:-almalinux8}
image: "cybercinch/docker-${MOLECULE_DISTRO:-almalinux8}-ansible:latest"
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
- /run
- /run/lock
- /tmp
cgroupns_mode: host
privileged: true
pre_build_image: true
provisioner:
name: ansible
env:
MOLECULE_NO_LOG: true
config_options:
defaults:
roles_path: "$MOLECULE_PROJECT_DIRECTORY/.."
# verifier:
# name: ansible
# lint: |
# set -e
# yamllint .
# ansible-lint

View File

@@ -0,0 +1,10 @@
---
# This is an example playbook to execute Ansible tests.
- name: Verify
hosts: all
gather_facts: false
tasks:
- name: Example assertion
assert:
that: true

7
requirements.txt Normal file
View File

@@ -0,0 +1,7 @@
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

3
requirements.yml Normal file
View File

@@ -0,0 +1,3 @@
collections:
- ansible.windows
- community.general

View File

@@ -1,25 +1,23 @@
---
# tasks file for common role
- include: networking.yml
- include_tasks: networking.yml
- name: Ensure common packages
yum:
name: "{{item}}"
state: present
enablerepo: epel
with_items: "{{ common_packages }}"
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
- name: Ensure common packages (OracleLinux)
yum:
name: "{{item}}"
name: "{{ common_packages }}"
state: present
enablerepo: ol7_developer_EPEL
with_items: "{{ common_packages }}"
when: ansible_distribution == 'OracleLinux'
tags: packages
- name: Check if SELinux is installed
stat:
path: /etc/selinux/config
@@ -40,7 +38,9 @@
# tags: security
- name: Create admin group
group: name={{ADMIN_GROUP}} state=present
group:
name: "{{ admin_group }}"
state: present
- name: Configure yum limit
lineinfile:
@@ -51,26 +51,22 @@
- name: Ensure Helpers are present
copy:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
src: helpers/
dest: /usr/local/bin/
mode: u+rwx,g+rx,o+rx
with_items:
- src: helpers/reload_scsi_devices
dest: /usr/local/bin/reload_scsi_devices
- src: helpers/reload_scsi_hosts
dest: /usr/local/bin/reload_scsi_hosts
- name: Ensure Hostname is set
hostname:
hostname:
name: "{{ inventory_hostname }}.{{ domain }}"
when: ansible_virtualization_type != "docker" and ansible_virtualization_type != "container"
- name: Change root password
user:
name: root
password: "{{ root_pwd }}"
user:
name: root
password: "{{ common_root_pwd | password_hash('sha512') }}"
changed_when: false
tags: rootpw
- include: grub.yml
- include: communication.yml
- include: motd.yml
- include_tasks: grub.yml
- include_tasks: communication.yml
- include_tasks: motd.yml

View File

@@ -11,14 +11,14 @@
state: present
update_password: always
changed_when: false
- name: Ensure System Culture Set
win_region:
location: 183
format: en-NZ
unicode_language: en-NZ
copy_settings: true
- name: Ensure DNS is set
win_dns_client:
adapter_names: "*"
@@ -30,7 +30,7 @@
admin_password: "{{ vault_ad_password }}"
domain_name: "{{ authconfig_domain }}"
when: ad_domain_joined
notify: reboot windows
notify: Reboot Windows
- meta: flush_handlers
- name: Ensure Important dirs exist
@@ -40,7 +40,7 @@
with_items:
- 'C:\Temp'
- 'C:\Tools'
#- name: Ensure Profile Tool Present
# win_copy:
# src: Defprof.exe
@@ -53,7 +53,7 @@
- name: Apply Windows Updates
win_updates:
when: apply_windows_updates
notify: reboot windows
notify: Reboot Windows
- meta: flush_handlers
- name: Ensure default applications installed
@@ -61,4 +61,3 @@
name: "{{ item }}"
state: present
with_items: "{{ win_packages }}"

5
tasks/common.yml Normal file
View File

@@ -0,0 +1,5 @@
---
- include_tasks: networking.yml
- include_tasks: communication.yml
- include_tasks: grub.yml
- include_tasks: motd.yml

View File

@@ -1,43 +1,48 @@
---
- name: Postfix Configuration
when: postfix_configure
block:
- name: postfix | Apply postfix configuration
- name: Postfix | Apply postfix configuration
lineinfile:
dest: "{{item.dest}}"
regexp: "{{item.regexp}}"
line: "{{item.line}}"
dest: "{{ configurations.dest }}"
regexp: "{{ configurations.regexp }}"
line: "{{ configurations.line }}"
insertafter: EOF
notify: Restart Postfix
when: "'SMTP0' not in inventory_hostname"
with_items:
- { dest: /etc/postfix/main.cf,
- {
dest: /etc/postfix/main.cf,
regexp: "^.?inet_protocols =",
line: "inet_protocols = ipv4"
line: "inet_protocols = ipv4",
}
- { dest: /etc/postfix/main.cf,
- {
dest: /etc/postfix/main.cf,
regexp: "^.?inet_interfaces =",
line: "inet_interfaces = all"
line: "inet_interfaces = all",
}
- { dest: /etc/postfix/main.cf,
- {
dest: /etc/postfix/main.cf,
regexp: "^.?relayhost =",
line: "relayhost = {{ relayhost }}"
line: "relayhost = {{ relayhost }}",
}
- {
dest: /etc/postfix/main.cf,
regexp: "^.?smtp_randomize_addresses =",
line: "smtp_randomize_addresses = no"
line: "smtp_randomize_addresses = no",
}
loop_control:
loop_var: configurations
- name: postfix | Ensure Postfix is Started/Enabled
- name: Postfix | Ensure Postfix is Started/Enabled
service:
name: postfix
state: started
enabled: yes
when: postfix_configure
- name: Ensure root forwarding address is set
lineinfile:
dest: ~/.forward
regexp: "{{ root_email }}"
line: "{{ root_email }}"
regexp: "{{ common_root_email }}"
line: "{{ common_root_email }}"
create: yes

View File

@@ -18,7 +18,9 @@
option: GRUB_TIMEOUT
value: "{{ common_grub_timeout }}"
no_extra_spaces: yes
when: "ansible_os_family == 'RedHat' and ansible_distribution_major_version == '7'"
notify: Update GRUB
when: "ansible_os_family == 'RedHat' and ansible_distribution_major_version > '6'"
notify:
- Check if grub.cfg exists
- Update GRUB
tags:
- grub
- grub

View File

@@ -1,2 +1,9 @@
---
- include: "{{ ansible_os_family }}.yml"
- name: Include tasks only if one of the files exist, otherwise skip the task
include_tasks: "{{ item }}"
vars:
params:
files:
- "{{ ansible_os_family }}.yml"
- "common.yml"
loop: "{{ q('first_found', params, errors='ignore') }}"

View File

@@ -16,4 +16,4 @@
dest: /etc/profile.d/motd.sh
regexp: "^/usr/local/bin/dynmotd"
line: "/usr/local/bin/dynmotd"
create: yes
create: yes

View File

@@ -1,47 +1,79 @@
---
- name: Ensure DNS and SSH common config
- name: What is virtualization type?
debug:
msg: "Virtualization is: {{ ansible_virtualization_type }}"
- name: Ensure Network Setup (RedHat only)
template:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
mode: "{{ item.mode }}"
src: "{{ network_config.src }}"
dest: "{{ network_config.dest }}"
mode: "{{ network_config.mode }}"
backup: yes
with_items:
- { src: etc.sysconfig.network.j2,
- {
src: etc.sysconfig.network.j2,
dest: /etc/sysconfig/network,
mode: u+rw,a+r
}
- { src: etc.resolv.conf.j2,
dest: /etc/resolv.conf,
mode: u+rw,a+r
mode: u+rw,
a+r,
}
when: >
ansible_virtualization_type != "docker"
and ansible_virtualization_type != "container"
and ansible_os_family == "RedHat"
loop_control:
loop_var: network_config
tags: dns
- name: Ensure Resolvers Configured
template:
src: "{{ network_config.src }}"
dest: "{{ network_config.dest }}"
mode: "{{ network_config.mode }}"
backup: yes
with_items:
- { src: etc.resolv.conf.j2, dest: /etc/resolv.conf, mode: u+rw, a+r }
when: >
ansible_virtualization_type != "docker"
and ansible_virtualization_type != "container"
loop_control:
loop_var: network_config
tags: dns
- name: Ensure hosts file correct
lineinfile:
dest: /etc/hosts
regexp: "{{ item.regexp }}"
line: "{{ item.line }}"
regexp: "{{ hosts_config.regexp }}"
line: "{{ hosts_config.line }}"
backrefs: yes
backup: yes
with_items:
- {regexp: "^127.0.0.1.+localdomain4$",
line: "127.0.0.1 localhost {{ inventory_hostname }}"
- {
regexp: "^127.0.0.1.+localdomain4$",
line: "127.0.0.1 localhost {{ inventory_hostname }}",
}
- {regexp: "^::1.+localdomain6$",
line: "::1 localhost {{ inventory_hostname }}"
- {
regexp: "^::1.+localdomain6$",
line: "::1 localhost {{ inventory_hostname }}",
}
- {regexp: "^{{ ansible_default_ipv4.address }}.*{{ ansible_default_ipv4.address.split('.')[-1] }}$",
line: "{{ ansible_default_ipv4.address }} {{ inventory_hostname }}.{{ domain }} {{ inventory_hostname }}"
- {
regexp: "^{{ ansible_default_ipv4.address }}.*{{ ansible_default_ipv4.address.split('.')[-1] }}$",
line: "{{ ansible_default_ipv4.address }} {{ inventory_hostname }}.{{ domain }} {{ inventory_hostname }}",
}
- {regexp: "^127.0.0.1.+{{ ansible_nodename.split('.')[0] }}$",
line: "127.0.0.1 localhost {{ inventory_hostname }}"
- {
regexp: "^127.0.0.1.+{{ ansible_nodename.split('.')[0] }}$",
line: "127.0.0.1 localhost {{ inventory_hostname }}",
}
- {regexp: "^::1.+{{ ansible_nodename.split('.')[0] }}$",
line: "::1 localhost {{ inventory_hostname }}"
- {
regexp: "^::1.+{{ ansible_nodename.split('.')[0] }}$",
line: "::1 localhost {{ inventory_hostname }}",
}
- {regexp: "^{{ ansible_default_ipv4.address }}.*{{ ansible_nodename.split('.')[0] }}$",
line: "{{ ansible_default_ipv4.address }} {{ inventory_hostname }}.{{ domain }} {{ inventory_hostname }}"
- {
regexp: "^{{ ansible_default_ipv4.address }}.*{{ ansible_nodename.split('.')[0] }}$",
line: "{{ ansible_default_ipv4.address }} {{ inventory_hostname }}.{{ domain }} {{ inventory_hostname }}",
}
loop_control:
loop_var: hosts_config
when: ansible_virtualization_type != "docker" and ansible_virtualization_type != "container"
- name: Ensure NetworkManager does not fiddle DNS
ini_file:
@@ -52,16 +84,21 @@
backup: yes
when: (ansible_os_family == "RedHat" and ansible_distribution_major_version == "7")
notify:
- restart NetworkManager
- Restart NetworkManager
changed_when: false
- name: Ensure correct permissions (hosts/resolv.conf)
file:
path: "{{item}}"
path: "{{ perm_config }}"
state: touch
mode: u+rw,g+r,a+r
with_items:
- /etc/resolv.conf
- /etc/hosts
loop_control:
loop_var: perm_config
when: >
ansible_virtualization_type != "docker"
and ansible_virtualization_type != "container"
changed_when: false
tags: dns
tags: dns

View File

@@ -15,41 +15,44 @@
# /usr/local/bin/dynmotd
#
USER=`/usr/bin/whoami`
HOSTNAME=`/usr/bin/uname -n | /usr/bin/cut -d. -f1`
IP=`/usr/sbin/ip route get 1 | grep -Po '(?<=src.)[\w\d.]+'`
IP6=`/sbin/ip -6 addr | awk -F '[ \t]+|/' '$3 == "::1" { next;} $3 ~ /^fe80::/ { next ; } /inet6/ {print $3} '`
NUM_CPU=`/usr/bin/lscpu | /usr/bin/grep "CPU(s):" | /usr/bin/head -n 1 | /usr/bin/awk '{print $2}'`
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 getent group "{{ admin_group }}" | grep -qw "$(whoami)"; then
USER=`/usr/bin/env whoami`
HOSTNAME=`/usr/bin/env uname -n | /usr/bin/env cut -d. -f1`
IP=`/usr/bin/env ip route get 1 | /usr/bin/env grep -Po '(?<=src.)[\w\d.]+'`
IP6=`/usr/bin/env ip -6 addr | /usr/bin/env awk -F '[ \t]+|/' '$3 == "::1" { next;} $3 ~ /^fe80::/ { next ; } /inet6/ {print $3} '`
NUM_CPU=`cat /proc/cpuinfo | grep processor | wc -l`
#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`
MEMORY=`/usr/bin/free -m | /usr/bin/grep "Mem" | /usr/bin/awk '{print $2,"-",$3,"-",$4}'`
SWAP=`/usr/bin/free -m | /usr/bin/grep "Swap" | /usr/bin/awk '{print $2,"-",$3,"-",$4}'`
PSA=`/usr/bin/ps -Afl | wc -l`
# time of day
HOUR=$(/usr/bin/date +"%H")
if [ $HOUR -lt 12 -a $HOUR -ge 0 ]
then TIME="morning"
elif [ $HOUR -lt 17 -a $HOUR -ge 12 ]
then TIME="afternoon"
else
# time of day
HOUR=$(/usr/bin/env date +"%H")
if [ $HOUR -lt 12 -a $HOUR -ge 0 ]
then TIME="morning"
elif [ $HOUR -lt 17 -a $HOUR -ge 12 ]
then TIME="afternoon"
else
TIME="evening"
fi
fi
#System uptime
uptime=`/usr/bin/cat /proc/uptime | cut -f1 -d.`
upDays=$((uptime/60/60/24))
upHours=$((uptime/60/60%24))
upMins=$((uptime/60%60))
upSecs=$((uptime%60))
#System uptime
uptime=`/usr/bin/env cat /proc/uptime | cut -f1 -d.`
upDays=$((uptime/60/60/24))
upHours=$((uptime/60/60%24))
upMins=$((uptime/60%60))
upSecs=$((uptime%60))
#System load
LOADAVG=`/usr/bin/cat /proc/loadavg`
LOAD1=`echo $LOADAVG | /usr/bin/awk {'print $1'}`
LOAD5=`echo $LOADAVG | /usr/bin/awk {'print $2'}`
LOAD15=`echo $LOADAVG | /usr/bin/awk {'print $3'}`
#System load
LOADAVG=`/usr/bin/env cat /proc/loadavg`
LOAD1=`echo $LOADAVG | /usr/bin/env awk {'print $1'}`
LOAD5=`echo $LOADAVG | /usr/bin/env awk {'print $2'}`
LOAD15=`echo $LOADAVG | /usr/bin/env awk {'print $3'}`
echo ""
echo -e "\e[7m--- GOOD $TIME $USER ----\e[0m"
@@ -62,23 +65,41 @@ COLOR_VALUE="\e[31m"
RESET_COLORS="\e[0m"
echo -e "
===========================================================================
$COLOR_COLUMN- Hostname$RESET_COLORS............: $COLOR_VALUE $HOSTNAME $RESET_COLORS
{% if common_show_ipv6 == true %}
$COLOR_COLUMN- IP Address (Main v4)$RESET_COLORS: $COLOR_VALUE $IP $RESET_COLORS
$COLOR_COLUMN- IP Address (Main v6)$RESET_COLORS: $COLOR_VALUE $IP6 $RESET_COLORS
{% else %} $COLOR_COLUMN- IP Address (Default)$RESET_COLORS: $COLOR_VALUE $IP $RESET_COLORS
$COLOR_COLUMN- Hostname$RESET_COLORS............: $COLOR_VALUE $HOSTNAME $RESET_COLORS
{% if common_show_ipv6 == true %}$COLOR_COLUMN- IP Address (Main v4)$RESET_COLORS: $COLOR_VALUE $IP $RESET_COLORS
$COLOR_COLUMN- IP Address (Main v6)$RESET_COLORS: $COLOR_VALUE $IP6 $RESET_COLORS
{% else %}$COLOR_COLUMN- IP Address (Default)$RESET_COLORS: $COLOR_VALUE $IP $RESET_COLORS
{% endif %}
{% if ansible_distribution == "Alpine" %}
$COLOR_COLUMN- Release$RESET_COLORS.............: $COLOR_VALUE Alpine `/usr/bin/env cat /etc/os-release` $RESET_COLORS
{% else %}
$COLOR_COLUMN- Release$RESET_COLORS.............: $COLOR_VALUE `/usr/bin/env cat /etc/os-release | /usr/bin/env grep PRETTY_NAME | /usr/bin/env cut -d '"' -f 2` $RESET_COLORS
{% endif %}
{% if ansible_distribution != "Alpine" %}
$COLOR_COLUMN- Users$RESET_COLORS...............: $COLOR_VALUE Currently `users | wc -w` user(s) logged on $RESET_COLORS
{% endif %}
$COLOR_COLUMN- Release$RESET_COLORS.............: $COLOR_VALUE `cat {{ ansible_distribution_file_path }}` $RESET_COLORS
$COLOR_COLUMN- Users$RESET_COLORS...............: $COLOR_VALUE Currently `users | wc -w` user(s) logged on $RESET_COLORS
=========================================================================== $RESET_COLORS
$COLOR_COLUMN- Current user$RESET_COLORS........: $COLOR_VALUE $USER $RESET_COLORS
$COLOR_COLUMN- Number of CPU$RESET_COLORS.......: $COLOR_VALUE $NUM_CPU $RESET_COLORS
$COLOR_COLUMN- CPU usage$RESET_COLORS...........: $COLOR_VALUE $LOAD1 - $LOAD5 - $LOAD15 (1-5-15 min) $RESET_COLORS
$COLOR_COLUMN- Memory used$RESET_COLORS.........: $COLOR_VALUE $MEMORY (total-used-free) $RESET_COLORS
$COLOR_COLUMN- Swap in use$RESET_COLORS.........: $COLOR_VALUE $SWAP (total-used-free) MB $RESET_COLORS
$COLOR_COLUMN- Processes$RESET_COLORS...........: $COLOR_VALUE $PSA running $RESET_COLORS
$COLOR_COLUMN- System uptime$RESET_COLORS.......: $COLOR_VALUE $upDays days $upHours hours $upMins minutes $upSecs seconds $RESET_COLORS
$COLOR_COLUMN- Disk space$RESET_COLORS..........: $COLOR_VALUE $ROOT remaining $RESET_COLORS
===========================================================================
`/usr/bin/cat /etc/motd`
$COLOR_COLUMN- Current user$RESET_COLORS........: $COLOR_VALUE $USER $RESET_COLORS
$COLOR_COLUMN- Number of CPU$RESET_COLORS.......: $COLOR_VALUE $NUM_CPU $RESET_COLORS
$COLOR_COLUMN- CPU usage$RESET_COLORS...........: $COLOR_VALUE $LOAD1 - $LOAD5 - $LOAD15 (1-5-15 min) $RESET_COLORS
$COLOR_COLUMN- Memory used$RESET_COLORS.........: $COLOR_VALUE $MEMORY (total-used-free) $RESET_COLORS
$COLOR_COLUMN- Swap in use$RESET_COLORS.........: $COLOR_VALUE $SWAP (total-used-free) MB $RESET_COLORS
$COLOR_COLUMN- Processes$RESET_COLORS...........: $COLOR_VALUE $PSA running $RESET_COLORS
$COLOR_COLUMN- System uptime$RESET_COLORS.......: $COLOR_VALUE $upDays days $upHours hours $upMins minutes $upSecs seconds $RESET_COLORS
{% if ansible_virtualization_type != "lxc" %}
$COLOR_COLUMN- Disk space$RESET_COLORS..........: "
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 "
===========================================================================
"
if [ -f /etc/motd ]; then
/usr/bin/env cat /etc/motd
fi
else
# Just exit :)
exit 0
fi;