Optimized tests für run once

This commit is contained in:
2025-08-12 02:38:37 +02:00
parent 82aaf7ad74
commit 1595a7c4a6
148 changed files with 1803 additions and 1147 deletions

View File

@@ -1,4 +1,3 @@
---
galaxy_info:
author: "Kevin Veen-Birkenbach"
description: "Creates a dedicated administrator user for local administrative tasks, ensuring secure privilege escalation and proper system management. This role configures the administrator account, sets up the home directory, SSH settings, and grants sudo privileges with password authentication."
@@ -10,18 +9,16 @@ galaxy_info:
https://www.veen.world
min_ansible_version: "2.9"
platforms:
- name: Linux
versions:
- all
- name: Linux
versions:
- all
galaxy_tags:
- user
- administrator
- security
- sudo
- ssh
- configuration
- user
- administrator
- security
- sudo
- ssh
- configuration
repository: "https://github.com/kevinveenbirkenbach/infinito-nexus"
issue_tracker_url: "https://github.com/kevinveenbirkenbach/infinito-nexus/issues"
documentation: "https://docs.infinito.nexus"
dependencies:
- sys-sudo

View File

@@ -1,3 +1,11 @@
- name: Load former meta dependencies once
block:
- name: Include moved dependency 'sys-sudo'
include_role:
name: sys-sudo
- set_fact:
run_once_user_administrator: true
when: run_once_user_administrator is not defined
- name: create administrator
user:
name: administrator
@@ -23,7 +31,7 @@
owner: administrator
group: administrator
mode: 0700
- name: create {{path_administrator_home}}.ssh/authorized_keys
copy:
src: "{{ inventory_dir }}/files/{{ inventory_hostname }}{{path_administrator_home}}.ssh/authorized_keys"
@@ -39,10 +47,10 @@
mode: '0644'
owner: root
group: root
notify: sshd restart
notify: sshd restart
- name: "embed user routines for {{ role_path | basename }}"
include_role:
name: user
vars:
user_name: "administrator"
user_name: "administrator"