Files
lpic-sim/ai/common/templates/ansible/roles/example/tasks/main.yml
T
Björn RundenandClaude Opus 5.5 7f6b8ebe07 Basis aus 2nd-brain für LPIC-Prüfungsvorbereitung übernommen
Regeln, Standards, Kontextstruktur und Werkzeuge übernommen; 2nd-brain-
Inhalte (Stacks, Ansible-Inventar, Architektur, Knowledge) entfernt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 21:56:53 +01:00

40 lines
1.1 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
## @brief Rolle example – Ablauf: prüfen → Geheimnisse → installieren → konfigurieren → testen
- name: Plattform prüfen (Debian >= 13 erwartet)
ansible.builtin.assert:
that:
- ansible_facts['os_family'] == 'Debian'
- ansible_facts['distribution_major_version'] | int >= 13
fail_msg: "{{ inventory_hostname }}: {{ ansible_facts['distribution'] }} {{ ansible_facts['distribution_version'] }} – Rolle ist für Debian >= 13 gebaut."
quiet: true
tags: [always]
- name: Geheimnisse laden
ansible.builtin.import_tasks: secrets.yml
tags: [always]
- name: Installieren
ansible.builtin.import_tasks: install.yml
tags: [install]
- name: Konfigurieren
ansible.builtin.import_tasks: config.yml
tags: [config]
- name: Handler jetzt ausführen (Config-Check vor Restart)
ansible.builtin.meta: flush_handlers
tags: [always]
- name: Dienst aktiv und gestartet
ansible.builtin.service:
name: "{{ example_service }}"
state: started
enabled: true
tags: [install, config]
- name: Smoke-Test
ansible.builtin.import_tasks: verify.yml
when: example_smoke_test | bool
tags: [verify]