Compare commits

54 Commits

Author SHA1 Message Date
22048124fd refac: use .yaml instead of .yml extension
All checks were successful
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
0db7c7265a Merge pull request 'chore(deps): update ansible/ansible-lint action to v25.9.2' (#36) from renovate/actions into master
All checks were successful
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
8249283978 chore(deps): update ansible/ansible-lint action to v25.9.2
All checks were successful
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
c5c832e0b3 Merge pull request 'chore(deps): update ansible/ansible-lint action to v25.9.1' (#35) from renovate/actions into master
All checks were successful
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
b58cd93dff chore(deps): update ansible/ansible-lint action to v25.9.1
All checks were successful
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
75b5e3fb32 chore(deps): update dependency @vscode/vsce to v3.6.2
All checks were successful
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
42478da122 Merge pull request 'chore(deps): update ansible/ansible-lint action to v25.9.0' (#32) from renovate/actions into master
All checks were successful
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
a4ee09ad9d Merge pull request 'chore(deps): update actions/checkout action to v5' (#33) from renovate/actions-checkout-5.x into master
All checks were successful
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
d72731c835 chore(deps): update actions/checkout action to v5
All checks were successful
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
a938dab1ec chore(deps): update ansible/ansible-lint action to v25.9.0
All checks were successful
Ansible Linter / ansible-lint (pull_request) Successful in 3m56s
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
2025-09-18 22:03:44 +00:00
042c91f42e chore(deps): update actions/checkout to v5.0.0
All checks were successful
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
f49f61bbc4 Merge pull request 'chore(deps): update ansible/ansible-lint action to v25.8.2' (#31) from renovate/actions into master
All checks were successful
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
551eed98d5 chore(deps): update ansible/ansible-lint action to v25.8.2
All checks were successful
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
e172e4990f Merge pull request 'chore(deps): update ansible/ansible-lint action to v25.8.1' (#30) from renovate/actions into master
All checks were successful
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
0e8f256a26 chore(deps): update ansible/ansible-lint action to v25.8.1
All checks were successful
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
e8d9c85aa5 Merge pull request 'chore(deps): update ansible/ansible-lint action to v25.8.0' (#29) from renovate/actions into master
All checks were successful
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
1ac0da5661 chore(deps): update ansible/ansible-lint action to v25.8.0
All checks were successful
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
345c739489 Merge pull request 'chore(deps): update actions/checkout action to v4.3.0' (#27) from renovate/actions into master
All checks were successful
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
e05d5d9574 chore(deps): update actions/checkout action to v4.3.0
All checks were successful
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
7a757ee119 fix(ansible-galaxy): adapt indentation
All checks were successful
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
c552f95227 fix(default): rename file
Some checks failed
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
e14ab7fc70 fix(ansible-galaxy): add namespace
Some checks failed
Ansible Linter / ansible-lint (push) Has been cancelled
Lint Markdown files / markdown-lint (push) Has been cancelled
2025-08-06 15:22:46 +02:00
d6666179a4 fix(ansible-galaxy): adapt list of supported platforms
Some checks failed
Lint Markdown files / markdown-lint (push) Successful in 13s
Ansible Linter / ansible-lint (push) Failing after 46s
2025-08-06 11:45:07 +02:00
13ada129ae fix(ansible-galaxy): remove namespace
Some checks failed
Lint Markdown files / markdown-lint (push) Successful in 9s
Ansible Linter / ansible-lint (push) Failing after 29s
2025-08-06 11:39:34 +02:00
ee87e4fe49 fix(linter): be compliant with ansible-linter
All checks were successful
Lint Markdown files / markdown-lint (push) Successful in 10s
Ansible Linter / ansible-lint (push) Successful in 38s
2025-08-06 10:57:03 +02:00
b1aca97f95 Merge pull request 'chore(deps): update ansible/ansible-lint action to v25.7.0' (#26) from renovate/actions into master
All checks were successful
Lint Markdown files / markdown-lint (push) Successful in 17s
Ansible Linter / ansible-lint (push) Successful in 57s
2025-07-29 22:12:48 +00:00
25a275031c chore(deps): update ansible/ansible-lint action to v25.7.0
All checks were successful
Lint Markdown files / markdown-lint (push) Successful in 17s
Ansible Linter / ansible-lint (push) Successful in 54s
Lint Markdown files / markdown-lint (pull_request) Successful in 15s
Ansible Linter / ansible-lint (pull_request) Successful in 58s
2025-07-29 22:04:50 +00:00
af94964494 docs(README): remove dead link
All checks were successful
Lint Markdown files / markdown-lint (push) Successful in 10s
Ansible Linter / ansible-lint (push) Successful in 31s
2025-07-12 23:27:07 +02:00
7bced73bdf docs(README): add further details
Some checks failed
Lint Markdown files / markdown-lint (push) Failing after 11s
Ansible Linter / ansible-lint (push) Successful in 48s
2025-07-12 23:22:31 +02:00
d6e4e18a86 fix(netrc): adapt netrc template
All checks were successful
Ansible Linter / ansible-lint (push) Successful in 1m6s
Lint Markdown files / markdown-lint (push) Successful in 12s
2025-07-12 12:18:00 +02:00
788a1f6610 fix(netrc): typo
All checks were successful
Ansible Linter / ansible-lint (push) Successful in 37s
Lint Markdown files / markdown-lint (push) Successful in 10s
2025-06-27 20:48:04 +02:00
9a3dbcfa86 feat(netrc): init
All checks were successful
Ansible Linter / ansible-lint (push) Successful in 55s
Lint Markdown files / markdown-lint (push) Successful in 12s
2025-06-27 20:39:09 +02:00
04fa692006 chore(deps): update ansible/ansible-lint action to v25.6.1
All checks were successful
Lint Markdown files / markdown-lint (pull_request) Successful in 5s
Ansible Linter / ansible-lint (pull_request) Successful in 54s
Lint Markdown files / markdown-lint (push) Successful in 11s
Ansible Linter / ansible-lint (push) Successful in 14s
2025-06-19 10:02:09 +00:00
d9d1624923 chore(deps): update ansible/ansible-lint action to v25.6.0
All checks were successful
Lint Markdown files / markdown-lint (pull_request) Successful in 11s
Ansible Linter / ansible-lint (pull_request) Successful in 40s
Lint Markdown files / markdown-lint (push) Successful in 10s
Ansible Linter / ansible-lint (push) Successful in 40s
2025-06-17 19:01:59 +00:00
08e1625648 docs(README): remove drone badge
All checks were successful
Ansible Linter / ansible-lint (push) Successful in 13s
Lint Markdown files / markdown-lint (push) Successful in 4s
2025-06-01 12:27:40 +02:00
abce2b3541 chore(deps): update davidanson/markdownlint-cli2-action action to v20
All checks were successful
Ansible Linter / ansible-lint (pull_request) Successful in 14s
Lint Markdown files / markdown-lint (pull_request) Successful in 12s
Lint Markdown files / markdown-lint (push) Successful in 4s
Ansible Linter / ansible-lint (push) Successful in 1m3s
2025-05-26 10:03:05 +00:00
88c54b622b chore(deps): update ansible/ansible-lint action to v25.5.0
All checks were successful
Lint Markdown files / markdown-lint (pull_request) Successful in 4s
Ansible Linter / ansible-lint (pull_request) Successful in 33s
Ansible Linter / ansible-lint (push) Successful in 14s
Lint Markdown files / markdown-lint (push) Successful in 14s
2025-05-26 07:02:33 +00:00
09131125ab chore(ci): use DavidAnson/markdownlint-cli2-action
All checks were successful
Lint Markdown files / markdown-lint (push) Successful in 4s
Ansible Linter / ansible-lint (push) Successful in 1m25s
2025-05-13 21:20:13 +02:00
b58c76fee8 chore(deps): update ansible/ansible-lint action to v25.4.0
All checks were successful
Lint Markdown files / markdown-lint (pull_request) Successful in 11s
Ansible Linter / ansible-lint (pull_request) Successful in 57s
Lint Markdown files / markdown-lint (push) Successful in 9s
Ansible Linter / ansible-lint (push) Successful in 51s
2025-04-28 13:02:08 +00:00
718f652e42 fix(ci): remove requirements condition
All checks were successful
Ansible Linter / ansible-lint (push) Successful in 54s
Lint Markdown files / markdown-lint (push) Successful in 9s
2025-04-14 22:50:38 +02:00
2d902c049a fix(ci): remove workflow_dispatch
Some checks failed
Ansible Linter / ansible-lint (push) Failing after 44s
Lint Markdown files / markdown-lint (push) Successful in 8s
2025-04-14 22:34:39 +02:00
215922676d feat(act-runner): init
Some checks are pending
Ansible Linter / ansible-lint (push) Waiting to run
Lint Markdown files / markdown-lint (push) Waiting to run
2025-04-14 22:31:39 +02:00
f835afc2da chore(renovate): use configuration preset
All checks were successful
continuous-integration/drone/push Build is passing
2025-04-01 22:20:18 +02:00
42ee2e045e Merge pull request 'chore(deps): update docker.io/volkerraschek/markdownlint docker tag to v0.44.0' (#19) from renovate/docker.io-volkerraschek-markdownlint-0.x into master
All checks were successful
continuous-integration/drone/push Build is passing
2025-04-01 19:03:09 +00:00
b0b9dc0f95 chore(deps): update docker.io/volkerraschek/markdownlint docker tag to v0.44.0
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2025-04-01 16:50:06 +00:00
7bf9944647 Merge pull request 'chore(deps): update docker.io/volkerraschek/markdownlint docker tag to v0.43.0' (#18) from renovate/docker.io-volkerraschek-markdownlint-0.x into master
All checks were successful
continuous-integration/drone/push Build is passing
2024-12-03 14:06:29 +00:00
7ddcc8b240 chore(deps): update docker.io/volkerraschek/markdownlint docker tag to v0.43.0
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2024-12-03 14:03:06 +00:00
5294694eea Merge pull request 'chore(deps): update docker.io/volkerraschek/markdownlint docker tag to v0.42.0' (#17) from renovate/docker.io-volkerraschek-markdownlint-0.x into master
All checks were successful
continuous-integration/drone/push Build is passing
2024-10-14 19:49:43 +00:00
4cc65d00df chore(deps): update docker.io/volkerraschek/markdownlint docker tag to v0.42.0
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2024-10-14 19:02:48 +00:00
4c467aaf88 fix: support ssh 'command' option
Some checks reported errors
continuous-integration/drone/push Build was killed
2024-10-04 11:44:44 +02:00
a7ac5ad637 Merge pull request 'chore(deps): update docker.io/volkerraschek/markdownlint docker tag to v0.41.0' (#16) from renovate/docker.io-volkerraschek-markdownlint-0.x into master
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-27 13:05:55 +00:00
a77cfe3587 chore(deps): update docker.io/volkerraschek/markdownlint docker tag to v0.41.0
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2024-05-27 13:03:22 +00:00
dffa64da08 Merge pull request 'chore(deps): update docker.io/volkerraschek/markdownlint docker tag to v0.40.0' (#15) from renovate/docker.io-volkerraschek-markdownlint-0.x into master
All checks were successful
continuous-integration/drone/push Build is passing
2024-05-07 22:05:06 +00:00
4501773c88 chore(deps): update docker.io/volkerraschek/markdownlint docker tag to v0.40.0
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2024-05-07 22:03:19 +00:00
22 changed files with 4192 additions and 110 deletions

View File

@@ -1,3 +1,4 @@
---
skip_list: []
exclude_paths:
- .gitea/

View File

@@ -1,42 +0,0 @@
---
kind: pipeline
type: kubernetes
name: linter
platform:
os: linux
steps:
- name: markdown lint
commands:
- markdownlint *.md
image: docker.io/volkerraschek/markdownlint:0.39.0
resources:
limits:
cpu: 50
memory: 50M
- name: email-notification
environment:
PLUGIN_HOST:
from_secret: smtp_host
PLUGIN_USERNAME:
from_secret: smtp_username
PLUGIN_PASSWORD:
from_secret: smtp_password
PLUGIN_FROM:
from_secret: smtp_mail_address
image: docker.io/drillster/drone-email:latest
resources:
limits:
cpu: 50
memory: 25M
when:
status:
- changed
- failure
trigger:
event:
exclude:
- tag

View File

@@ -0,0 +1,20 @@
name: Ansible Linter
on:
pull_request:
types: [ "opened", "reopened", "synchronize" ]
push:
branches: [ '**' ]
tags-ignore: [ '**' ]
jobs:
ansible-lint:
runs-on:
- ubuntu-latest
steps:
- uses: actions/checkout@v5.0.0
- name: Run ansible-lint
uses: ansible/ansible-lint@v25.9.2
with:
args: "--config-file .ansible-lint"
setup_python: "true"

View File

@@ -0,0 +1,18 @@
name: Lint Markdown files
on:
pull_request:
types: [ "opened", "reopened", "synchronize" ]
push:
branches: [ '**' ]
tags-ignore: [ '**' ]
jobs:
markdown-lint:
runs-on:
- ubuntu-latest
steps:
- uses: actions/checkout@v5.0.0
- uses: DavidAnson/markdownlint-cli2-action@v20.0.0
with:
globs: '**/*.md'

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.ansible

View File

@@ -45,19 +45,17 @@ MD012:
# MD013/line-length - Line length
MD013:
# Number of characters
line_length: 80
line_length: 120
# Number of characters for headings
heading_line_length: 80
heading_line_length: 120
# Number of characters for code blocks
code_block_line_length: 80
code_block_line_length: 120
# Include code blocks
code_blocks: false
# Include tables
tables: false
# Include headings
headings: true
# Include headings
headers: true
# Strict length checking
strict: false
# Stern length checking
@@ -70,11 +68,6 @@ MD022:
# Blank lines below heading
lines_below: 1
# MD024/no-duplicate-heading/no-duplicate-header - Multiple headings with the same content
MD024:
# Only check sibling headings
allow_different_nesting: true
# MD025/single-title/single-h1 - Multiple top-level headings in the same document
MD025:
# Heading level
@@ -128,7 +121,8 @@ MD041:
# MD044/proper-names - Proper names should have the correct capitalization
MD044:
# List of proper names
names: []
names:
- gitea
# Include code blocks
code_blocks: false

19
.yamllint.yaml Normal file
View File

@@ -0,0 +1,19 @@
---
#
# Documentation:
# https://yamllint.readthedocs.io/en/stable/
#
rules:
brackets:
forbid: false
min-spaces-inside: 0
max-spaces-inside: 2
min-spaces-inside-empty: 0
max-spaces-inside-empty: 0
indentation:
spaces: 2
indent-sequences: false
line-length:
max: 360

190
README.md
View File

@@ -1,23 +1,183 @@
# unix_users
# volker-raschek.unix-users
[![Build Status](https://drone.cryptic.systems/api/badges/volker.raschek/unix_users-role/status.svg)](https://drone.cryptic.systems/volker.raschek/unix_users-role)
[![Ansible Role](https://img.shields.io/ansible/role/d/59132)](https://galaxy.ansible.com/volker_raschek/unix_users)
![Ansible Role](https://img.shields.io/ansible/role/d/volker-raschek/unix-users)
With following role can be unix users and groups configured.
The ansible role `volker-raschek.unix-users` create and manage users on Linux based distributions. For example for Arch
Linux, Fedora and Ubuntu. Furthermore, the role can also be used to create groups, `~/.forward`, `~/.netrc` and to
manage the `~/.ssh` directory.
## Supported distributions
## Examples
- Arch Linux
- Ubuntu 20.04
### User and group
## Features
The following example create the user `toor` and group `toor`. Booth with a specific id.
- Setting up unix users and groups
- Setting up private and public ssh keys
- Setting up private and public gpg keys
- Setting up .forward file for postfix
```yaml
unix_groups:
toor:
gid: "1001"
state: present
## Configuring
unix_users:
toor:
state: present
name: Toor
uid: "1000"
home: /home/toor
shell: /bin/bash
password: toor
group: toor
```
In the default directory are examples how to configure the role. Copy the
defaults into your `host_vars` or `group_vars` and adapt the examples.
### Btrfs home dir
Optionally, the home directory of a user can also be created as dedicated btrfs subvolume. This make it possible to
create snapshots of the home directory, for example via `btrbk`.
```yaml
unix_users:
toor:
state: present
name: Toor
uid: "1000"
home: /home/toor
btrfs: true
shell: /bin/bash
password: toor
group: toor
```
### .netrc
The ansible role supports the creation and management of the `.netrc` file in a user's home directory. The `.netrc` file
for the user `toor` is created below. This contains entries for GitHub.
```yaml
unix_users:
toor:
state: present
name: Toor
uid: "1000"
home: /home/toor
netrc:
- machine: github.com
login: octocat
password: pat_12345
- machine: api.github.com
login: octocat
password: pat_12345
shell: /bin/bash
password: toor
group: toor
```
### .ssh
The SSH client directory `~/.ssh` can also be managed via the Ansible role. This supports the creation and management of
`~/.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.
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.
The public keys `claire@claire-pc.pub` as well as `bob@bob-pc.pub` must be stored in `ssh/authorized_keys`.
```yaml
unix_users:
toor:
state: present
name: Toor
uid: "1000"
home: /home/toor
ssh:
config:
- Host: "*"
StrictHostKeyChecking: "no"
UserKnownHostFile: /dev/null
authorized_keys:
- filename: claire@claire-pc.pub
- command: /usr/local/bin/upload-file.sh
filename: bob@bob-pc.pub
private_keys:
- toor@toor-pc.ed25519.key
shell: /bin/bash
password: toor
group: toor
```
### .forward
If on the system is postfix installed, postfix will respect the `~/.forward`
[file](https://www.postfix.org/local.8.html). This allows to forward local emails to external email addresses. The
following example create the `~/.forward` file for `toor` to forward emails to `toor@company.example.local`.
```yaml
unix_users:
toor:
state: present
name: Toor
uid: "1000"
home: /home/toor
email: toor@company.example.local
shell: /bin/bash
password: toor
group: toor
```
### shell_rc files
The role also supports the creation of bashrc drop-in files. These are created in `~/.bashrc.d` and included by
`~/.bashrc` via `source`.
Program-related configurations can be made via a drop-in file. For example, the configuration of the bash history via
the environment variables `HISTCONTROL` or `HISTFILE`. In addition to environment variables, aliases and complete
functions can also be defined.
```yaml
unix_users:
toor:
state: present
name: Toor
uid: "1000"
home: /home/toor
email: toor@company.example.local
shell: /bin/bash
shell_rc_files:
- file: "/home/toor/.bashrc.d/10-docker.bashrc" # absolute or relative path to home dir
aliases:
- key: "dcd"
value: "docker-compose down"
envs:
- export: true
key: "PATH"
value: "/home/toor/workspace/docker-compose/bin:${PATH}" # Add local compiled docker-compose into $PATH
functions:
- name: "foo"
value: |
if ! which docker 1> /dev/null; then
echo "ERROR: docker not found" 1>&2
exit 1
fi
password: toor
group: toor
```
## Further ansible roles
This ansible role is used in combination with other ansible roles of `volker-raschek`. You can search for the other
ansible roles via the following command.
```bash
$ ansible-galaxy role search --author "volker-raschek"
Found roles matching your search:
Name Description
---- -----------
volker-raschek.bind9 Role to install and configure bind9 on different distributions
volker-raschek.dhcpd Role to install and configure dhcpd on different distributions
volker-raschek.renovate Role to configure renovate as container image
...
```

View File

@@ -19,11 +19,16 @@ unix_users: {}
# StrictHostKeyChecking: "no"
# UserKnownHostFile: /dev/null
# authorized_keys:
# - alice@alice-pc.pub
# - filename: alice@alice-pc.pub
# # command: "" # optional
# private_keys:
# - alice@alice-pc.ed25519.key
# home: /home/alice
# btrfs: false
# netrc:
# - machine: hostame.local
# login: username
# password: password
# shell: /bin/bash
# shell_rc_files:
# - file: "/home/alice/.bashrc.d/docker.bashrc" # absolute or relative path to home dir

View File

@@ -1,24 +1,27 @@
dependencies: []
galaxy_info:
role_name: "unix-users"
author: "Markus Pesch"
description: "Role to create and configure unix users and groups"
company: "Cryptic Systems"
license: "MIT"
min_ansible_version: "2.9"
platforms:
- name: ArchLinux
versions:
- all
- name: Ubuntu
versions:
- all
- name: Fedora
versions:
- "35"
description: "Role to create and configure unix users and groups"
galaxy_tags:
- system
- user
- unix
- linux
dependencies: []
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
role_name: "unix_users"

3890
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

5
package.json Normal file
View File

@@ -0,0 +1,5 @@
{
"dependencies": {
"@vscode/vsce": "^3.6.0"
}
}

View File

@@ -1,17 +1,9 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"assignees": [ "volker.raschek" ],
"automergeStrategy": "merge-commit",
"automergeType": "pr",
"labels": [ "renovate" ],
"packageRules": [
{
"addLabels": [ "renovate/droneci", "renovate/automerge" ],
"automerge": true,
"matchManagers": "droneci",
"matchUpdateTypes": [ "minor", "patch"]
}
],
"rebaseLabel": "renovate/rebase",
"rebaseWhen": "behind-base-branch"
"extends": [
"local>volker.raschek/renovate-config:default#master",
"local>volker.raschek/renovate-config:container#master",
"local>volker.raschek/renovate-config:actions#master",
"local>volker.raschek/renovate-config:regexp#master"
]
}

View File

@@ -76,7 +76,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,8 +190,17 @@
- 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:
loop_var: shell_rc_file
- name: "Create .netrc file"
when: unix_user.value.netrc is defined and unix_user.value.netrc | length > 0
ansible.builtin.template:
src: netrc.j2
dest: "{{ user_user_home }}/.netrc"
owner: "{{ unix_user.key }}"
group: "{{ unix_user.value.group | default('users') }}"
mode: "0600"

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:

View File

@@ -2,6 +2,10 @@
#
# {{ ansible_managed }}
#
{% for key in unix_user.value.ssh.authorized_keys %}
{{ lookup('file', 'ssh/authorized_keys/' + key) }}
{% 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 %}
{{ lookup('file', 'ssh/authorized_keys/' + authorized_key.filename ) }}
{% endif %}
{% endfor %}

3
templates/netrc.j2 Normal file
View File

@@ -0,0 +1,3 @@
{% for netrc in unix_user.value.netrc %}
machine {{ netrc.maschine }} login {{ netrc.login }} password {{ netrc.password }}
{% endfor %}