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: "Configures a secure SSH daemon environment by deploying a templated sshd_config file and restarting the SSH service as needed."
@@ -10,16 +9,14 @@ galaxy_info:
https://www.veen.world
min_ansible_version: "2.9"
platforms:
- name: Linux
versions:
- all
- name: Linux
versions:
- all
galaxy_tags:
- sshd
- ssh
- security
- configuration
- sshd
- ssh
- security
- configuration
repository: "https://github.com/kevinveenbirkenbach/infinito-nexus"
issue_tracker_url: "https://github.com/kevinveenbirkenbach/infinito-nexus/issues"
documentation: "https://docs.infinito.nexus"
dependencies:
- user-administrator

View File

@@ -1,14 +1,22 @@
- block:
- name: create sshd_config
template:
src: "sshd_config.j2"
dest: /etc/ssh/sshd_config
owner: root
group: root
mode: '0644'
notify: sshd restart
- name: run the sshd tasks once
set_fact:
run_once_sys_svc_sshd: true
- name: Load former meta dependencies once
block:
- name: Include moved dependency 'user-administrator'
include_role:
name: user-administrator
- set_fact:
run_once_sys_svc_sshd: true
when: run_once_sys_svc_sshd is not defined
- block:
- name: create sshd_config
template:
src: "sshd_config.j2"
dest: /etc/ssh/sshd_config
owner: root
group: root
mode: '0644'
notify: sshd restart
- name: run the sshd tasks once
set_fact:
run_once_sys_svc_sshd: true
when: run_once_sys_svc_sshd is not defined