62 Commits

Author SHA1 Message Date
CSRBot 55ba89a41b chore(deps): pin dependencies
Lint Markdown files / markdown-lint (pull_request) Successful in 10s
Ansible Linter / ansible-lint (pull_request) Successful in 1m44s
Lint Markdown files / markdown-lint (push) Successful in 20s
Ansible Linter / ansible-lint (push) Successful in 50s
2026-06-15 18:02:28 +00:00
CSRBot c7a8e3c5ab Merge pull request 'chore(deps): update actions/checkout action to v6.0.3' (#52) from renovate/actions into master
Ansible Linter / ansible-lint (push) Failing after 9s
Lint Markdown files / markdown-lint (push) Successful in 5s
2026-06-02 15:15:41 +00:00
CSRBot 3afee5bce7 chore(deps): update actions/checkout action to v6.0.3
Lint Markdown files / markdown-lint (pull_request) Successful in 5s
Ansible Linter / ansible-lint (pull_request) Successful in 1m5s
Ansible Linter / ansible-lint (push) Successful in 28s
Lint Markdown files / markdown-lint (push) Successful in 10s
2026-06-02 15:02:46 +00:00
CSRBot 73adc91eb3 Merge pull request 'chore(deps): update ansible/ansible-lint action to v26.4.0' (#51) from renovate/actions into master
Ansible Linter / ansible-lint (push) Failing after 8s
Lint Markdown files / markdown-lint (push) Successful in 5s
2026-04-14 11:08:08 +00:00
CSRBot cc6c1b1189 chore(deps): update ansible/ansible-lint action to v26.4.0
Ansible Linter / ansible-lint (pull_request) Successful in 24s
Ansible Linter / ansible-lint (push) Successful in 29s
Lint Markdown files / markdown-lint (pull_request) Successful in 18s
Lint Markdown files / markdown-lint (push) Successful in 5s
2026-04-14 10:48:25 +00:00
CSRBot 151bb67e3d Merge pull request 'chore(deps): update ansible/ansible-lint action to v26.3.0' (#50) from renovate/actions into master
Ansible Linter / ansible-lint (push) Successful in 1m0s
Lint Markdown files / markdown-lint (push) Successful in 10s
2026-03-05 14:07:07 +00:00
CSRBot b1e7bc5993 chore(deps): update ansible/ansible-lint action to v26.3.0
Lint Markdown files / markdown-lint (push) Successful in 6s
Ansible Linter / ansible-lint (pull_request) Successful in 20s
Lint Markdown files / markdown-lint (pull_request) Successful in 5s
Ansible Linter / ansible-lint (push) Successful in 59s
2026-03-05 14:01:55 +00:00
CSRBot f34d963618 Merge pull request 'chore(deps): update ansible/ansible-lint action to v26.2.0' (#49) from renovate/actions into master
Lint Markdown files / markdown-lint (push) Successful in 4s
Ansible Linter / ansible-lint (push) Successful in 24s
2026-02-25 17:25:02 +00:00
CSRBot 14325d5f4a chore(deps): update ansible/ansible-lint action to v26.2.0
Ansible Linter / ansible-lint (push) Successful in 20s
Lint Markdown files / markdown-lint (push) Successful in 5s
Lint Markdown files / markdown-lint (pull_request) Successful in 6s
Ansible Linter / ansible-lint (pull_request) Successful in 59s
2026-02-25 17:18:52 +00:00
CSRBot f322c8078a Merge pull request 'chore(deps): update actions/checkout action to v6.0.2' (#48) from renovate/actions into master
Ansible Linter / ansible-lint (push) Successful in 18s
Lint Markdown files / markdown-lint (push) Successful in 5s
2026-01-22 17:10:08 +00:00
CSRBot a2bf5cac96 chore(deps): update actions/checkout action to v6.0.2
Lint Markdown files / markdown-lint (push) Successful in 5s
Ansible Linter / ansible-lint (pull_request) Successful in 19s
Lint Markdown files / markdown-lint (pull_request) Successful in 5s
Ansible Linter / ansible-lint (push) Successful in 59s
2026-01-22 17:01:44 +00:00
CSRBot 2a514a3588 Merge pull request 'chore(deps): update ansible/ansible-lint action to v26.1.1' (#47) from renovate/actions into master
Lint Markdown files / markdown-lint (push) Successful in 9s
Ansible Linter / ansible-lint (push) Successful in 18s
2026-01-16 05:06:26 +00:00
CSRBot c64e2b85b2 chore(deps): update ansible/ansible-lint action to v26.1.1
Ansible Linter / ansible-lint (push) Successful in 17s
Lint Markdown files / markdown-lint (pull_request) Successful in 5s
Lint Markdown files / markdown-lint (push) Successful in 4s
Ansible Linter / ansible-lint (pull_request) Successful in 57s
2026-01-16 05:01:25 +00:00
CSRBot b14f3ee512 chore(deps): update ansible/ansible-lint action to v26
Lint Markdown files / markdown-lint (pull_request) Successful in 4s
Ansible Linter / ansible-lint (pull_request) Successful in 58s
Ansible Linter / ansible-lint (push) Successful in 20s
Lint Markdown files / markdown-lint (push) Successful in 5s
2026-01-11 23:01:16 +00:00
volker.raschek a4b28d441b fix(ci): add workflow dispatch for releases
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
volker.raschek 1ec88f37fb fix(ci): use dynamic github repository name
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
volker.raschek 09c4173eaf docs(ci): get steps a dedicated name
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
volker.raschek 14f856fdea fix(ci): add release workflow
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
volker.raschek 86d85c431c fix!: rename environments to envs
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
volker.raschek 88e9a163e1 docs: support environment variables in authorized_keys file
Ansible Linter / ansible-lint (push) Successful in 18s
Lint Markdown files / markdown-lint (push) Successful in 5s
2026-01-07 10:35:40 +01:00
volker.raschek 69491c9aa0 feat: support environment variables in authorized_keys file
Ansible Linter / ansible-lint (push) Successful in 21s
Lint Markdown files / markdown-lint (push) Successful in 5s
2026-01-07 10:28:13 +01:00
volker.raschek 47d9a58910 fix: replace deprecated INJECT_FACTS_AS_VARS
Ansible Linter / ansible-lint (push) Successful in 17s
Lint Markdown files / markdown-lint (push) Successful in 4s
2026-01-05 10:28:33 +01:00
CSRBot e176bb0bee Merge pull request 'chore(deps): update ansible/ansible-lint action to v25.12.2' (#45) from renovate/actions into master
Ansible Linter / ansible-lint (push) Successful in 18s
Lint Markdown files / markdown-lint (push) Successful in 5s
2025-12-22 20:06:24 +00:00
CSRBot 9acd6de876 chore(deps): update ansible/ansible-lint action to v25.12.2
Ansible Linter / ansible-lint (push) Successful in 18s
Lint Markdown files / markdown-lint (push) Successful in 4s
Lint Markdown files / markdown-lint (pull_request) Successful in 5s
Ansible Linter / ansible-lint (pull_request) Successful in 56s
2025-12-22 20:01:29 +00:00
CSRBot c0566e2416 Merge pull request 'chore(deps): update ansible/ansible-lint action to v25.12.1' (#44) from renovate/actions into master
Ansible Linter / ansible-lint (push) Successful in 17s
Lint Markdown files / markdown-lint (push) Successful in 4s
2025-12-10 14:06:34 +00:00
CSRBot 509882a193 chore(deps): update ansible/ansible-lint action to v25.12.1
Ansible Linter / ansible-lint (push) Successful in 17s
Lint Markdown files / markdown-lint (push) Successful in 4s
Ansible Linter / ansible-lint (pull_request) Successful in 17s
Lint Markdown files / markdown-lint (pull_request) Successful in 4s
2025-12-10 14:01:33 +00:00
CSRBot e98925af4b Merge pull request 'chore(deps): update actions/checkout action to v6' (#43) from renovate/actions-checkout-6.x into master
Ansible Linter / ansible-lint (push) Successful in 18s
Lint Markdown files / markdown-lint (push) Successful in 4s
2025-12-02 21:09:51 +00:00
CSRBot 8a25dac377 chore(deps): update actions/checkout action to v6
Ansible Linter / ansible-lint (push) Successful in 18s
Lint Markdown files / markdown-lint (pull_request) Successful in 4s
Lint Markdown files / markdown-lint (push) Successful in 4s
Ansible Linter / ansible-lint (pull_request) Successful in 59s
2025-12-02 21:01:40 +00:00
CSRBot 7602cc621c Merge pull request 'chore(deps): update ansible/ansible-lint action to v25.12.0' (#42) from renovate/actions into master
Ansible Linter / ansible-lint (push) Successful in 18s
Lint Markdown files / markdown-lint (push) Successful in 5s
2025-12-02 17:05:49 +00:00
CSRBot b7560320dc chore(deps): update ansible/ansible-lint action to v25.12.0
Ansible Linter / ansible-lint (pull_request) Successful in 17s
Lint Markdown files / markdown-lint (pull_request) Successful in 5s
Lint Markdown files / markdown-lint (push) Successful in 4s
Ansible Linter / ansible-lint (push) Successful in 59s
2025-12-02 17:01:25 +00:00
CSRBot 4241502728 Merge pull request 'chore(deps): update ansible/ansible-lint action to v25.11.1' (#41) from renovate/actions into master
Lint Markdown files / markdown-lint (push) Successful in 11s
Ansible Linter / ansible-lint (push) Successful in 18s
2025-11-24 23:06:01 +00:00
CSRBot f5062ff179 chore(deps): update ansible/ansible-lint action to v25.11.1
Ansible Linter / ansible-lint (push) Successful in 17s
Lint Markdown files / markdown-lint (push) Successful in 5s
Ansible Linter / ansible-lint (pull_request) Successful in 18s
Lint Markdown files / markdown-lint (pull_request) Successful in 5s
2025-11-24 23:01:45 +00:00
volker.raschek e4c12b9856 fix: set btrfs device
Ansible Linter / ansible-lint (push) Successful in 24s
Lint Markdown files / markdown-lint (push) Successful in 4s
2025-11-22 23:42:42 +01:00
volker.raschek 13a4c84978 fix(npm): remove npm dependencies
Ansible Linter / ansible-lint (push) Successful in 20s
Lint Markdown files / markdown-lint (push) Successful in 5s
2025-11-18 22:53:51 +01:00
CSRBot 0a89f30f92 Merge pull request 'chore(deps): update davidanson/markdownlint-cli2-action action to v21' (#39) from renovate/davidanson-markdownlint-cli2-action-21.x into master
Ansible Linter / ansible-lint (push) Successful in 57s
Lint Markdown files / markdown-lint (push) Successful in 9s
2025-11-18 17:02:07 +00:00
CSRBot 2640acca4d chore(deps): update davidanson/markdownlint-cli2-action action to v21
Ansible Linter / ansible-lint (push) Successful in 58s
Lint Markdown files / markdown-lint (push) Successful in 9s
Ansible Linter / ansible-lint (pull_request) Successful in 57s
Lint Markdown files / markdown-lint (pull_request) Successful in 10s
2025-11-17 20:01:33 +00:00
CSRBot 278d723aa1 Merge pull request 'chore(deps): update actions/checkout action to v5.0.1' (#40) from renovate/actions into master
Ansible Linter / ansible-lint (push) Successful in 58s
Lint Markdown files / markdown-lint (push) Successful in 10s
2025-11-17 17:20:38 +00:00
CSRBot bc61cf3fa8 chore(deps): update actions/checkout action to v5.0.1
Ansible Linter / ansible-lint (pull_request) Successful in 57s
Ansible Linter / ansible-lint (push) Successful in 58s
Lint Markdown files / markdown-lint (pull_request) Successful in 10s
Lint Markdown files / markdown-lint (push) Successful in 9s
2025-11-17 17:02:03 +00:00
volker.raschek 015f9aacee fix(netrc): typo maschine
Ansible Linter / ansible-lint (push) Successful in 21s
Lint Markdown files / markdown-lint (push) Successful in 4s
2025-11-16 11:41:52 +01:00
CSRBot b4c70b472e Merge pull request 'chore(deps): update ansible/ansible-lint action to v25.11.0' (#38) from renovate/actions into master
Lint Markdown files / markdown-lint (push) Successful in 4s
Ansible Linter / ansible-lint (push) Successful in 57s
2025-11-10 14:07:29 +00:00
CSRBot fc2b257c98 chore(deps): update ansible/ansible-lint action to v25.11.0
Ansible Linter / ansible-lint (pull_request) Successful in 17s
Lint Markdown files / markdown-lint (pull_request) Successful in 3s
Ansible Linter / ansible-lint (push) Successful in 17s
Lint Markdown files / markdown-lint (push) Successful in 3s
2025-11-10 14:01:50 +00:00
volker.raschek 22048124fd refac: use .yaml instead of .yml extension
Ansible Linter / ansible-lint (push) Successful in 24s
Lint Markdown files / markdown-lint (push) Successful in 4s
2025-10-25 12:38:00 +02:00
CSRBot 0db7c7265a Merge pull request 'chore(deps): update ansible/ansible-lint action to v25.9.2' (#36) from renovate/actions into master
Lint Markdown files / markdown-lint (push) Successful in 4s
Ansible Linter / ansible-lint (push) Successful in 58s
2025-10-08 13:06:21 +00:00
CSRBot 8249283978 chore(deps): update ansible/ansible-lint action to v25.9.2
Lint Markdown files / markdown-lint (push) Successful in 4s
Ansible Linter / ansible-lint (pull_request) Successful in 17s
Lint Markdown files / markdown-lint (pull_request) Successful in 4s
Ansible Linter / ansible-lint (push) Successful in 58s
2025-10-08 13:02:29 +00:00
CSRBot c5c832e0b3 Merge pull request 'chore(deps): update ansible/ansible-lint action to v25.9.1' (#35) from renovate/actions into master
Ansible Linter / ansible-lint (push) Successful in 16s
Lint Markdown files / markdown-lint (push) Successful in 4s
2025-10-01 13:07:09 +00:00
CSRBot b58cd93dff chore(deps): update ansible/ansible-lint action to v25.9.1
Lint Markdown files / markdown-lint (push) Successful in 8s
Ansible Linter / ansible-lint (push) Successful in 18s
Lint Markdown files / markdown-lint (pull_request) Successful in 5s
Ansible Linter / ansible-lint (pull_request) Successful in 56s
2025-10-01 13:03:00 +00:00
CSRBot 75b5e3fb32 chore(deps): update dependency @vscode/vsce to v3.6.2
Ansible Linter / ansible-lint (pull_request) Successful in 25s
Lint Markdown files / markdown-lint (pull_request) Successful in 3s
Lint Markdown files / markdown-lint (push) Successful in 9s
Ansible Linter / ansible-lint (push) Successful in 20s
2025-09-26 16:01:30 +00:00
CSRBot 42478da122 Merge pull request 'chore(deps): update ansible/ansible-lint action to v25.9.0' (#32) from renovate/actions into master
Ansible Linter / ansible-lint (push) Successful in 19s
Lint Markdown files / markdown-lint (push) Successful in 4s
2025-09-19 19:57:48 +00:00
CSRBot a4ee09ad9d Merge pull request 'chore(deps): update actions/checkout action to v5' (#33) from renovate/actions-checkout-5.x into master
Ansible Linter / ansible-lint (push) Successful in 16s
Lint Markdown files / markdown-lint (push) Successful in 4s
2025-09-19 19:39:50 +00:00
CSRBot d72731c835 chore(deps): update actions/checkout action to v5
Lint Markdown files / markdown-lint (push) Successful in 15s
Ansible Linter / ansible-lint (pull_request) Successful in 18s
Lint Markdown files / markdown-lint (pull_request) Successful in 4s
Ansible Linter / ansible-lint (push) Successful in 2m53s
2025-09-18 22:03:50 +00:00
CSRBot a938dab1ec chore(deps): update ansible/ansible-lint action to v25.9.0
Lint Markdown files / markdown-lint (push) Successful in 11s
Ansible Linter / ansible-lint (push) Successful in 1m7s
Lint Markdown files / markdown-lint (pull_request) Successful in 4s
Ansible Linter / ansible-lint (pull_request) Successful in 3m56s
2025-09-18 22:03:44 +00:00
volker.raschek 042c91f42e chore(deps): update actions/checkout to v5.0.0
Lint Markdown files / markdown-lint (push) Successful in 4s
Ansible Linter / ansible-lint (push) Successful in 17s
2025-09-18 22:33:29 +02:00
CSRBot f49f61bbc4 Merge pull request 'chore(deps): update ansible/ansible-lint action to v25.8.2' (#31) from renovate/actions into master
Ansible Linter / ansible-lint (push) Successful in 15s
Lint Markdown files / markdown-lint (push) Successful in 15s
2025-08-21 16:06:06 +00:00
CSRBot 551eed98d5 chore(deps): update ansible/ansible-lint action to v25.8.2
Lint Markdown files / markdown-lint (push) Successful in 4s
Ansible Linter / ansible-lint (pull_request) Successful in 15s
Lint Markdown files / markdown-lint (pull_request) Successful in 15s
Ansible Linter / ansible-lint (push) Successful in 57s
2025-08-21 16:02:41 +00:00
CSRBot e172e4990f Merge pull request 'chore(deps): update ansible/ansible-lint action to v25.8.1' (#30) from renovate/actions into master
Ansible Linter / ansible-lint (push) Successful in 15s
Lint Markdown files / markdown-lint (push) Successful in 21s
2025-08-14 01:05:25 +00:00
CSRBot 0e8f256a26 chore(deps): update ansible/ansible-lint action to v25.8.1
Ansible Linter / ansible-lint (push) Successful in 15s
Lint Markdown files / markdown-lint (push) Successful in 4s
Ansible Linter / ansible-lint (pull_request) Successful in 15s
Lint Markdown files / markdown-lint (pull_request) Successful in 8s
2025-08-14 01:02:26 +00:00
CSRBot e8d9c85aa5 Merge pull request 'chore(deps): update ansible/ansible-lint action to v25.8.0' (#29) from renovate/actions into master
Lint Markdown files / markdown-lint (push) Successful in 10s
Ansible Linter / ansible-lint (push) Successful in 15s
2025-08-13 16:05:18 +00:00
CSRBot 1ac0da5661 chore(deps): update ansible/ansible-lint action to v25.8.0
Ansible Linter / ansible-lint (push) Successful in 14s
Ansible Linter / ansible-lint (pull_request) Successful in 15s
Lint Markdown files / markdown-lint (pull_request) Successful in 10s
Lint Markdown files / markdown-lint (push) Successful in 20s
2025-08-13 16:02:19 +00:00
CSRBot 345c739489 Merge pull request 'chore(deps): update actions/checkout action to v4.3.0' (#27) from renovate/actions into master
Ansible Linter / ansible-lint (push) Successful in 16s
Lint Markdown files / markdown-lint (push) Successful in 4s
2025-08-11 13:24:03 +00:00
CSRBot e05d5d9574 chore(deps): update actions/checkout action to v4.3.0
Ansible Linter / ansible-lint (push) Successful in 55s
Lint Markdown files / markdown-lint (push) Successful in 10s
Ansible Linter / ansible-lint (pull_request) Successful in 56s
Lint Markdown files / markdown-lint (pull_request) Successful in 10s
2025-08-11 13:03:56 +00:00
volker.raschek 7a757ee119 fix(ansible-galaxy): adapt indentation
Ansible Linter / ansible-lint (push) Successful in 38s
Lint Markdown files / markdown-lint (push) Successful in 12s
2025-08-06 16:10:36 +02:00
volker.raschek c552f95227 fix(default): rename file
Lint Markdown files / markdown-lint (push) Successful in 10s
Ansible Linter / ansible-lint (push) Failing after 41s
2025-08-06 15:24:39 +02:00
16 changed files with 116 additions and 32 deletions
+2 -2
View File
@@ -12,9 +12,9 @@ jobs:
runs-on:
- ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Run ansible-lint
uses: ansible/ansible-lint@v25.7.0
uses: ansible/ansible-lint@5fac056c45595896c973fbde871f01f6cb14d74c # v26.4.0
with:
args: "--config-file .ansible-lint"
setup_python: "true"
+2 -2
View File
@@ -12,7 +12,7 @@ jobs:
runs-on:
- ubuntu-latest
steps:
- uses: actions/checkout@v4.2.2
- uses: DavidAnson/markdownlint-cli2-action@v20.0.0
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: DavidAnson/markdownlint-cli2-action@30a0e04f1870d58f8d717450cc6134995f993c63 # v21.0.0
with:
globs: '**/*.md'
+22
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#*/}
+14
View File
@@ -0,0 +1,14 @@
{
"ansible.python.interpreterPath": "/bin/python",
"files.associations": {
"**/.gitea/**/*.yml": "yaml",
"**/.gitea/**/*.yaml": "yaml",
"docker-compose*.yml": "dockercompose",
"*.yml": "ansible",
"*.yaml": "ansible",
".yamllint": "yaml",
".yamllint.yml": "yaml",
".yamllint.yaml": "yaml"
},
"rewrap.wrappingColumn": 120
}
+8 -1
View File
@@ -77,7 +77,11 @@ The SSH client directory `~/.ssh` can also be managed via the Ansible role. This
`~/.ssh/config`, `~/.ssh/authorized_keys` as well as the maintenance of private and public SSH keys.
The following example create two entries in `~/.ssh/authorized_keys`. One normal SSH access for `claire`. If `bob`
establish a SSH connection the command `/usr/local/bin/upload-file.sh` will be executed and exited.
establish a SSH connection the command `/usr/local/bin/upload-file.sh` will be executed and exited. Furthermore,
environment variables can be espcilitly defined, to consume it during execution of the command.
> [!IMPORTANT]
> To allow consuming environment variables must be set `PermitUserEnvironment yes` in `/etc/ssh/sshd_config`.
The private key `toor@toor-pc.ed25519.key` must be stored in `ssh/private_keys`. The public key will be automatically
extracted from the private key.
@@ -99,6 +103,9 @@ unix_users:
authorized_keys:
- filename: claire@claire-pc.pub
- command: /usr/local/bin/upload-file.sh
envs:
- key: SSH_KEY_NAME
value: bob@bob-pc
filename: bob@bob-pc.pub
private_keys:
- toor@toor-pc.ed25519.key
+16 -16
View File
@@ -4,24 +4,24 @@ galaxy_info:
company: "Cryptic Systems"
description: "Role to create and configure unix users and groups"
galaxy_tags:
- system
- user
- unix
- linux
- system
- user
- unix
- linux
license: "MIT"
min_ansible_version: "2.9"
namespace: volker-raschek
platforms:
- name: ArchLinux
versions:
- all
- name: EL
versions:
- all
- name: Fedora
versions:
- all
- name: Ubuntu
versions:
- all
- name: ArchLinux
versions:
- all
- name: EL
versions:
- all
- name: Fedora
versions:
- all
- name: Ubuntu
versions:
- all
role_name: "unix_users"
@@ -8,9 +8,33 @@
when: unix_user.value.btrfs is defined and
unix_user.value.btrfs
block:
- name: "Find btrfs device"
ansible.builtin.command:
cmd: /bin/bash -c "findmnt -no SOURCE -T {{ user_user_home }} | sed 's/\[.*\]//'"
register: _unix_users_btrfs_device
failed_when: _unix_users_btrfs_device.rc != 0
changed_when: _unix_users_btrfs_device.rc == 0
- name: "Found btrfs device"
ansible.builtin.debug:
msg: _unix_users_btrfs_device.stdout
when: _unix_users_debug is defined and
_unix_users_debug is true
- name: "Determine filesystem of device"
ansible.builtin.set_fact:
_unix_users_device_filesystem: "{{ ansible_facts['mounts'] | selectattr('device', 'equalto', _unix_users_btrfs_device.stdout) | map(attribute='fstype') | first }}"
- name: "Fail if device does not have a btrfs file system"
ansible.builtin.fail:
msg: "Determined device {{ _unix_users_btrfs_device.stdout }} does not have a btrfs filesystem"
when: _unix_users_device_filesystem != 'btrfs'
- name: "Create btrfs volume for unix user: {{ unix_user.key }}"
community.general.btrfs_subvolume:
filesystem_device: "{{ _unix_users_btrfs_device.stdout }}"
name: "{{ user_user_home }}"
state: present
- name: "Adapt home dir permissions"
ansible.builtin.file:
path: "{{ user_user_home }}"
@@ -76,7 +100,7 @@
unix_user.value.btrfs
block:
- name: "Copy skel files"
ansible.builtin.include_tasks: copy_skel_file.yml
ansible.builtin.include_tasks: copy_skel_file.yaml
loop_control:
loop_var: skel_file
with_items:
@@ -190,7 +214,7 @@
- name: "Create shell rc files"
when: unix_user.value.shell_rc_files is defined
ansible.builtin.include_tasks: create_shell_rc_file.yml
ansible.builtin.include_tasks: create_shell_rc_file.yaml
with_items:
- "{{ unix_user.value.shell_rc_files }}"
loop_control:
+4 -4
View File
@@ -1,7 +1,7 @@
---
- name: Remove unix user
ansible.builtin.include_tasks: remove_unix_user.yml
ansible.builtin.include_tasks: remove_unix_user.yaml
with_dict: "{{ unix_users }}"
loop_control:
loop_var: unix_user
@@ -11,7 +11,7 @@
unix_user.value.state == 'absent'
- name: Remove unix groups
ansible.builtin.include_tasks: remove_unix_group.yml
ansible.builtin.include_tasks: remove_unix_group.yaml
with_dict: "{{ unix_groups }}"
loop_control:
loop_var: unix_group
@@ -21,7 +21,7 @@
unix_group.value.state == 'absent'
- name: Create unix groups
ansible.builtin.include_tasks: create_unix_group.yml
ansible.builtin.include_tasks: create_unix_group.yaml
with_dict: "{{ unix_groups }}"
loop_control:
loop_var: unix_group
@@ -33,7 +33,7 @@
)
- name: Create unix users
ansible.builtin.include_tasks: create_unix_user.yml
ansible.builtin.include_tasks: create_unix_user.yaml
no_log: true
with_dict: "{{ unix_users }}"
loop_control:
+21 -4
View File
@@ -3,9 +3,26 @@
# {{ ansible_managed }}
#
{% for authorized_key in unix_user.value.ssh.authorized_keys %}
{% if authorized_key.command is defined and authorized_key.command | length > 0 %}
command="{{ authorized_key.command }}" {{ lookup('file', 'ssh/authorized_keys/' + authorized_key.filename ) }}
{% else %}
{% set _args = [] %}
{% if authorized_key.command is defined and authorized_key.command | length > 0 %}
{% set _args = _args + [ "command=\"" + authorized_key.command + "\"" ] %}
{% endif %}
{% if authorized_key.envs is defined %}
{% set ns = namespace(envs=[]) %}
{% for environment in authorized_key.envs %}
{% if environment.key is defined and environment.key | length > 0 and
environment.value is defined and environment.value | length > 0
%}
{% set ns.envs = ns.envs + [ environment.key + "=" + environment.value ] %}
{% endif %}
{% endfor %}
{% if ns.envs | length > 0 %}
{% set _args = _args + [ "environment=\"" + (ns.envs | join(',')) + "\"" ] %}
{% endif %}
{% endif %}
{% if _args | length > 0 %}
{{ _args | join(',') }} {{ lookup('file', 'ssh/authorized_keys/' + authorized_key.filename ) }}
{% else %}
{{ lookup('file', 'ssh/authorized_keys/' + authorized_key.filename ) }}
{% endif %}
{% endif %}
{% endfor %}
+1 -1
View File
@@ -1,3 +1,3 @@
{% for netrc in unix_user.value.netrc %}
machine {{ netrc.maschine }} login {{ netrc.login }} password {{ netrc.password }}
machine {{ netrc.machine }} login {{ netrc.login }} password {{ netrc.password }}
{% endfor %}