Commit graph

143 commits

Author SHA1 Message Date
23bc6d7b69 🚨 roles: Fix remaining fqcn linter warnings
fqcn[action-core]: Use FQCN for builtin module actions (service).
    roles/apache_letsencrypt/handlers/main.yml:3 Use `ansible.builtin.service` or `ansible.legacy.service` instead.

    fqcn[action-core]: Use FQCN for builtin module actions (apt).
    roles/dd24_dyndns_cron/tasks/main.yml:2 Use `ansible.builtin.apt` or `ansible.legacy.apt` instead.

    fqcn[action-core]: Use FQCN for builtin module actions (apt).
    roles/desec_dyndns_cron/tasks/main.yml:2 Use `ansible.builtin.apt` or `ansible.legacy.apt` instead.

    fqcn[action-core]: Use FQCN for builtin module actions (command).
    roles/nfs_host/handlers/main.yml:2 Use `ansible.builtin.command` or `ansible.legacy.command` instead.
2025-03-09 19:00:21 +01:00
bec6fc20b7 🚨 roles: apache: Fix fqcn linter warnings
fqcn[action-core]: Use FQCN for builtin module actions (service).
    roles/apache/handlers/main.yml:3 Use `ansible.builtin.service` or `ansible.legacy.service` instead.

    fqcn[action-core]: Use FQCN for builtin module actions (apt).
    roles/apache/tasks/main.yml:2 Use `ansible.builtin.apt` or `ansible.legacy.apt` instead.

    fqcn[action]: Use FQCN for module actions, such `community.general.apache2_module`.
    roles/apache/tasks/main.yml:8 Action `apache2_module` is not FQCN.
2025-03-09 19:00:21 +01:00
8b54b36392 🚨 roles: cleanuri: Fix fqcn linter warnings
fqcn[action]: Use FQCN for module actions, such `community.docker.docker_container`.
    roles/cleanuri/tasks/main.yml:3 Action `docker_container` is not FQCN.

    fqcn[action-core]: Use FQCN for builtin module actions (include_role).
    roles/cleanuri/tasks/main.yml:17 Use `ansible.builtin.include_role` or `ansible.legacy.include_role` instead.

    fqcn[action]: Use FQCN for module actions, such `community.docker.docker_container`.
    roles/cleanuri/tasks/main.yml:25 Action `docker_container` is not FQCN.

    fqcn[action]: Use FQCN for module actions, such `community.docker.docker_container`.
    roles/cleanuri/tasks/main.yml:44 Action `docker_container` is not FQCN.

    fqcn[action]: Use FQCN for module actions, such `community.docker.docker_container`.
    roles/cleanuri/tasks/main.yml:61 Action `docker_container` is not FQCN.

    fqcn[action-core]: Use FQCN for builtin module actions (include_role).
    roles/cleanuri/tasks/main.yml:78 Use `ansible.builtin.include_role` or `ansible.legacy.include_role` instead.
2025-03-09 18:26:03 +01:00
11e98a4d8e 🚨 roles: nginx_https_ingress: Fix fqcn linter warnings
fqcn[action-core]: Use FQCN for builtin module actions (service).
    roles/nginx_https_ingress/handlers/main.yml:3 Use `ansible.builtin.service` or `ansible.legacy.service` instead.

    fqcn[action-core]: Use FQCN for builtin module actions (apt_key).
    roles/nginx_https_ingress/tasks/main.yml:20 Use `ansible.builtin.apt_key` or `ansible.legacy.apt_key` instead.
2025-03-08 22:25:28 +01:00
eeb87d2108 🚨 roles: setup_http_site_forward: Fix fqcn linter warnings
fqcn[action-core]: Use FQCN for builtin module actions (service).
    roles/setup_http_site_forward/handlers/main.yml:2 Use `ansible.builtin.service` or `ansible.legacy.service` instead.

    fqcn[action-core]: Use FQCN for builtin module actions (template).
    roles/setup_http_site_forward/tasks/main.yml:2 Use `ansible.builtin.template` or `ansible.legacy.template` instead.

    fqcn[action-core]: Use FQCN for builtin module actions (command).
    roles/setup_http_site_forward/tasks/main.yml:8 Use `ansible.builtin.command` or `ansible.legacy.command` instead.
2025-03-08 22:17:23 +01:00
cb50012dd3 🚨 roles: setup_http_site_proxy: Fix fqcn linter warnings
fqcn[action-core]: Use FQCN for builtin module actions (service).
    roles/setup_http_site_proxy/handlers/main.yml:2 Use `ansible.builtin.service` or `ansible.legacy.service` instead.

    fqcn[action-core]: Use FQCN for builtin module actions (template).
    roles/setup_http_site_proxy/tasks/main.yml:2 Use `ansible.builtin.template` or `ansible.legacy.template` instead.

    fqcn[action-core]: Use FQCN for builtin module actions (command).
    roles/setup_http_site_proxy/tasks/main.yml:9 Use `ansible.builtin.command` or `ansible.legacy.command` instead.
2025-03-08 22:12:00 +01:00
2b0e31870d 🚨 roles: users: Fix linter warnings of type 'fqcn'
fqcn[action-core]: Use FQCN for builtin module actions (shell).
    roles/users/handlers/main.yml:2 Use `ansible.builtin.shell` or `ansible.legacy.shell` instead.

    fqcn[action-core]: Use FQCN for builtin module actions (package).
    roles/users/tasks/main.yml:2 Use `ansible.builtin.package` or `ansible.legacy.package` instead.

    fqcn[action-core]: Use FQCN for builtin module actions (lineinfile).
    roles/users/tasks/main.yml:8 Use `ansible.builtin.lineinfile` or `ansible.legacy.lineinfile` instead.

    fqcn[action-core]: Use FQCN for builtin module actions (user).
    roles/users/tasks/main.yml:16 Use `ansible.builtin.user` or `ansible.legacy.user` instead.

    fqcn[action]: Use FQCN for module actions, such `ansible.posix.authorized_key`.
    roles/users/tasks/main.yml:24 Action `authorized_key` is not FQCN.

    fqcn[action-core]: Use FQCN for builtin module actions (user).
    roles/users/tasks/main.yml:34 Use `ansible.builtin.user` or `ansible.legacy.user` instead.

    fqcn[action-core]: Use FQCN for builtin module actions (stat).
    roles/users/tasks/main.yml:42 Use `ansible.builtin.stat` or `ansible.legacy.stat` instead.

    fqcn[action-core]: Use FQCN for builtin module actions (lineinfile).
    roles/users/tasks/main.yml:47 Use `ansible.builtin.lineinfile` or `ansible.legacy.lineinfile` instead.
2025-03-08 22:04:04 +01:00
8b2ab7753d 🚨 Fix linter warnings of type 'name[casing]'
ansible-lint reads like this:

    name[casing]: All names should start with an uppercase letter.

While at it: Some task/handler names were slightly adapted to better
match what should be done.
2025-03-01 21:21:22 +01:00
94bdf60700 🚨 roles: setup_http_site_forward: Rename
Roles names should be lowercase with underscores only.
ansible-lint complained:

    % ansible-lint -t role-name
    WARNING  Listing 1 violation(s) that are fatal
    role-name: Role name setup-http-site-forward does not match ``^[a-z][a-z0-9_]*$`` pattern.
    roles/setup-http-site-forward:1

    Read documentation for instructions on how to ignore specific rule violations.

                 Rule Violation Summary
     count tag       profile rule associated tags
         1 role-name basic   deprecations, metadata

    Failed after min profile: 1 failure(s), 0 warning(s) on 135 files.

Fixes: 85c09ea2ae ("Add role for apache forward site")
2025-02-28 08:49:53 +01:00
7e5b723a3a 🚨 roles: nfs_host: Rename
Roles names are expected to be lower case with underscores only,
see ansible-lint warning:

    % ansible-lint -t role-name
    WARNING  Listing 1 violation(s) that are fatal
    role-name: Role name nfs-host does not match ``^[a-z][a-z0-9_]*$`` pattern.
    roles/nfs-host:1

    Read documentation for instructions on how to ignore specific rule violations.

                 Rule Violation Summary
     count tag       profile rule associated tags
         1 role-name basic   deprecations, metadata

    Failed after min profile: 1 failure(s), 0 warning(s) on 135 files.

Fixes: 2138870520 ("nfs server wird nicht im k3s laufen, labeling entfernt")
2025-02-28 08:49:18 +01:00
338dfc7410 🔊 Redirect curl output to debug log
curl only logs its own errors to stderr with the given options (--silent
--show-error).  Requests answered by the remote webserver, regardless of
HTTP status code, go to stdout.  So in case of an unsuccesful update
with some error condition we could not see that before.  Redirect those
to debug log, because it's still quite noisy otherwise.

This adds 288 log messages per day and service to the debug log,
accounting to max. 30k per day and service, and thus should not hurt.

desec log output is only the word "good" in case of success.

dd24 full output would be this, and is thus reduced to the relevant
lines merged in one line:

    [RESPONSE]
    code = 200
    description = Command completed successfully
    runtime = 0.067
    queuetime = 0
    EOF

Sample journald entry:

    Feb 27 12:48:15 pottwal dd24[519651]: code = 200,description = Command completed successfully
2025-02-27 14:06:19 +01:00
58e27dec10 🐛 Use bash as shell in cron jobs to make process substitution work
The cron jobs were executed, but dash (/bin/sh) complained, and so the
actual command was never run.  This is why our dyndns update did not
work through cron, but when executed manually in bash by an admin.

Example for such a fail when done manually in sh:

    # echo test3 > >(/usr/bin/logger -p user.debug -t dd24)
    /bin/sh: 7: Syntax error: redirection unexpected

Process substitution with `>(command)` is a feature supported by bash
and other shells, but not by POSIX shell which was supposed to used here
(set by `SHELL=…`).  Instead of building complicated redirect magic for
sh just switch to bash, which should be available on the hosts affected.

Link: https://www.shellcheck.net/wiki/SC3001
Fixes: 03dbd132eb ("🔊 Send DD24 cron errors to syslog")
Fixes: 38fbff30b5 ("feat: add role to manage dyndns entry on desec.io")
2025-02-27 14:03:18 +01:00
b22c86758e 🚚 Migrate docker_host role to external project
We used a similar local role here, in the Freifunk Magdeburg project,
and in personal playbooks.  That was moved to an external project,
unified, and reworked, so the external role can act as replacement for
the distributed, redundant copies.

Link: https://github.com/netz39/ansible-role-host-docker
2025-02-23 19:18:21 +01:00
41ab4622b3 🚨 Fix trivial jinja spacing warnings
Fixes the following ansible-lint warnings:

    jinja[spacing]: Jinja2 spacing could be improved: group:Admins:{{ users | map(attribute = 'logname') | join("@pam,") }}@pam:: -> group:Admins:{{ users | map(attribute='logname') | join("@pam,") }}@pam:: (warning)
    host-beaker.yml:23 Jinja2 template rewrite recommendation: `group:Admins:{{ users | map(attribute='logname') | join("@pam,") }}@pam::`.

    jinja[spacing]: Jinja2 spacing could be improved: {{  docker_ip_ranges  }} -> {{  docker_ip_ranges }} (warning)
    host-krypton.yml:95 Jinja2 template rewrite recommendation: `{{  docker_ip_ranges }}`.

    jinja[spacing]: Jinja2 spacing could be improved: {{  item  }} -> {{  item }} (warning)
    host-krypton.yml:98 Jinja2 template rewrite recommendation: `{{  item }}`.

    jinja[spacing]: Jinja2 spacing could be improved: {{  docker_ip_ranges  }} -> {{  docker_ip_ranges }} (warning)
    host-krypton.yml:105 Jinja2 template rewrite recommendation: `{{  docker_ip_ranges }}`.

    jinja[spacing]: Jinja2 spacing could be improved: {{  item  }} -> {{  item }} (warning)
    host-krypton.yml:108 Jinja2 template rewrite recommendation: `{{  item }}`.

    jinja[spacing]: Jinja2 spacing could be improved: {{ cleanuri_amqp_user  }} -> {{ cleanuri_amqp_user }} (warning)
    roles/cleanuri/tasks/main.yml:36 Jinja2 template rewrite recommendation: `{{ cleanuri_amqp_user }}`.

    jinja[spacing]: Jinja2 spacing could be improved: {{ cleanuri_amqp_user  }} -> {{ cleanuri_amqp_user }} (warning)
    roles/cleanuri/tasks/main.yml:53 Jinja2 template rewrite recommendation: `{{ cleanuri_amqp_user }}`.

    jinja[spacing]: Jinja2 spacing could be improved: {{ cleanuri_amqp_user  }} -> {{ cleanuri_amqp_user }} (warning)
    roles/cleanuri/tasks/main.yml:70 Jinja2 template rewrite recommendation: `{{ cleanuri_amqp_user }}`.
2025-02-20 06:43:59 +01:00
a9e5a509a5 🚨 Fix wrong indentation
Fixes the following ansible-lint warnings:

    yaml[indentation]: Wrong indentation: expected 6 but found 4
    roles/nfs-host/tasks/main.yml:6

    yaml[indentation]: Wrong indentation: expected 6 but found 4
    roles/nginx_https_ingress/tasks/main.yml:11

    yaml[indentation]: Wrong indentation: expected 6 but found 4
    roles/nginx_https_ingress/tasks/main.yml:48
2025-02-19 21:55:53 +01:00
49dd796a05 🚨 Modernize ansible-lint silence markup
Fixes the following warning when running `ansible-lint`:

    WARNING  Replaced outdated tag '503' with 'no-handler', replace it to avoid future regressions

Link: https://ansible.readthedocs.io/projects/lint/rules/no-handler/
2025-02-19 21:40:23 +01:00
38fbff30b5 feat: add role to manage dyndns entry on desec.io 2024-11-02 22:31:28 +01:00
83a9b81cbc feat: add docker images prune cron job to docker_setup role 2024-09-10 20:42:30 +02:00
e6a2cb9e97 Update cleanURI-webui to 0.2.1
Security Updates
2024-05-02 10:10:48 +02:00
5f890d4858 Update cleanURI components to the latest versions
This completes the switch to the new Site API and external site
implementations.

As there is some trouble with Amazon (see https://github.com/penguineer/cleanURI-site-implementations/pull/5)
Amazon is not available for now.
2024-02-26 20:10:04 +01:00
222a030ab7 Update cleanURI to the new Site interface 2023-11-28 21:37:07 +01:00
764e54f530 fix: correct order of operations in nfs-host role 2023-11-04 17:16:02 +01:00
1bf1191484 fix permissions on nfs mount point 2023-11-04 17:16:02 +01:00
9887e40fba add nfs-host role for plumbum.n39.eu 2023-11-04 17:16:02 +01:00
ffa3b5d975 rework nfs-host role 2023-11-04 17:16:02 +01:00
3bdd93b16d feat: make nfs exports more configurable 2023-11-04 17:16:02 +01:00
aa54dcffdc set access mode to 0000 to disable writes in mount point 2023-11-04 17:16:02 +01:00
2138870520 nfs server wird nicht im k3s laufen, labeling entfernt 2023-11-04 17:16:02 +01:00
aff06a396f add more ansible tasks to rolE 2023-11-04 17:16:02 +01:00
760f2d7137 initial plan for storage host role 2023-11-04 17:16:02 +01:00
b70bf5222e ⬆️ Apply security releases for cleanuri components
Security releases are available due to a vulnerability in the json library:

* https://github.com/penguineer/cleanURI-apigateway/releases/tag/v0.3.1
* https://github.com/penguineer/cleanURI-canonizer/releases/tag/v0.3.1
2023-10-16 12:00:05 +02:00
13a5285f89 ⬆️ Update cleanuri-webui to 0.2.0
https://github.com/penguineer/cleanURI-webui/releases/tag/v0.2.0
2023-02-24 16:39:28 +01:00
04c68cd410 🐢 Show some appreciation
See http://www.gnuterrypratchett.com/
2022-11-22 18:49:39 +01:00
059b8a0bea 👌 Expand arguments for readability 2022-11-22 18:35:22 +01:00
03dbd132eb 🔊 Send DD24 cron errors to syslog 2022-11-22 18:34:54 +01:00
29ead08db8 🔇 Disable curl transfer logs for DD24 call 2022-11-22 18:34:25 +01:00
ad9dfbffd8 Add option to set ProxyPreserveHost
https://httpd.apache.org/docs/current/en/mod/mod_proxy.html#proxypreservehost
2022-11-12 13:32:25 +01:00
0b83ee25cd 🔧 Add timezone info to cleanuri containers 2022-11-10 17:54:45 +01:00
c620de7d0d fix file permissions for setup_http_site_proxy 2022-10-28 21:19:48 +02:00
bbf01577fd fix: fix missing file permissions for role setup_http_site_proxy 2022-10-28 21:19:44 +02:00
7555a13bf8 fix: fix missing file permissions for role docker_setup 2022-10-28 21:18:17 +02:00
e071790c1e 🔥 Remove obsolete role dehydrated-cron
We replaced this with penguineer.dehydrated_cron.
2022-10-25 16:54:14 +02:00
60ff54ce74 fix: rename role setup-http-site-proxy to resolve ansible lint warning 106 2022-10-24 22:22:36 +02:00
1d0c703c42 fix: rename role nginx-https-ingres to resolve ansible lint warning 106 2022-10-24 22:22:35 +02:00
3d22d93ba1 fix: rename role dd24-dyndns-cron to resolve ansible lint warning 106 2022-10-24 22:22:35 +02:00
38ff34fb57 fix: rename role apache-letsencrypt to resolve linter warnings 2022-10-24 22:22:35 +02:00
69cf188426 fix: suppress false positive ansible lint warning 503 2022-10-24 22:22:35 +02:00
24929a36bc Add a role to set up cleanuri (uritools) 2022-09-15 18:09:16 +02:00
b9488e19db 🐛 Fix proxy site template
These are errors from a bodged PR (my bad) that has been merged too early.
2022-09-14 23:25:41 +02:00
182feeca58 🔥 Remove role setup-http-dehydrated
This feature is now provided by setup-http-site-proxy
2022-09-08 15:45:39 +02:00