5 Commits

Author SHA1 Message Date
a4b28d441b fix(ci): add workflow dispatch for releases
All checks were successful
Ansible Linter / ansible-lint (push) Successful in 18s
Lint Markdown files / markdown-lint (push) Successful in 5s
2026-01-11 21:16:12 +01:00
1ec88f37fb fix(ci): use dynamic github repository name
All checks were successful
Ansible Linter / ansible-lint (push) Successful in 19s
Lint Markdown files / markdown-lint (push) Successful in 4s
Release Ansible Role / Release Ansible Role (push) Successful in 56s
2026-01-07 16:09:07 +01:00
09c4173eaf docs(ci): get steps a dedicated name
All checks were successful
Ansible Linter / ansible-lint (push) Successful in 19s
Lint Markdown files / markdown-lint (push) Successful in 4s
2026-01-07 16:02:12 +01:00
14f856fdea fix(ci): add release workflow
All checks were successful
Ansible Linter / ansible-lint (push) Successful in 20s
Lint Markdown files / markdown-lint (push) Successful in 4s
Release to Ansible Galaxy / release (push) Successful in 59s
2026-01-07 16:00:01 +01:00
86d85c431c fix!: rename environments to envs
All checks were successful
Ansible Linter / ansible-lint (push) Successful in 19s
Lint Markdown files / markdown-lint (push) Successful in 4s
2026-01-07 11:16:12 +01:00
3 changed files with 25 additions and 3 deletions

View File

@@ -0,0 +1,22 @@
name: Release Ansible Role
on:
push:
tags:
- '**'
workflow_dispatch: {}
jobs:
release:
name: Release Ansible Role
runs-on: ubuntu-latest
steps:
- name: Install Ansible Galaxy
run: |
apt update --yes
apt install --yes ansible
- env:
ANSIBLE_GALAXY_TOKEN: ${{ secrets.ANSIBLE_GALAXY_TOKEN }}
name: Update Ansible Role in Ansible Galaxy
run: |
ansible-galaxy role import --token=${ANSIBLE_GALAXY_TOKEN} volker-raschek ${GITHUB_REPOSITORY#*/}

View File

@@ -103,7 +103,7 @@ unix_users:
authorized_keys: authorized_keys:
- filename: claire@claire-pc.pub - filename: claire@claire-pc.pub
- command: /usr/local/bin/upload-file.sh - command: /usr/local/bin/upload-file.sh
environments: envs:
- key: SSH_KEY_NAME - key: SSH_KEY_NAME
value: bob@bob-pc value: bob@bob-pc
filename: bob@bob-pc.pub filename: bob@bob-pc.pub

View File

@@ -7,9 +7,9 @@
{% if authorized_key.command is defined and authorized_key.command | length > 0 %} {% if authorized_key.command is defined and authorized_key.command | length > 0 %}
{% set _args = _args + [ "command=\"" + authorized_key.command + "\"" ] %} {% set _args = _args + [ "command=\"" + authorized_key.command + "\"" ] %}
{% endif %} {% endif %}
{% if authorized_key.environments is defined %} {% if authorized_key.envs is defined %}
{% set ns = namespace(envs=[]) %} {% set ns = namespace(envs=[]) %}
{% for environment in authorized_key.environments %} {% for environment in authorized_key.envs %}
{% if environment.key is defined and environment.key | length > 0 and {% if environment.key is defined and environment.key | length > 0 and
environment.value is defined and environment.value | length > 0 environment.value is defined and environment.value | length > 0
%} %}