Solved bugs appearing during backup-server setup (light weigth installation)

This commit is contained in:
Kevin Veen-Birkenbach 2025-06-20 15:50:24 +02:00
parent 20c3fdd455
commit cfc052c129
No known key found for this signature in database
GPG Key ID: 44D8F11FD62F878E
8 changed files with 76 additions and 9 deletions

View File

@ -1,16 +1,27 @@
- name: Check if docker is installed
ansible.builtin.stat:
path: /usr/bin/docker
register: docker_bin
- name: "pkgmgr install"
include_role:
name: pkgmgr-install
vars:
package_name: dockreap
when: run_once_cleanup_docker_anonymous_volumes is not defined
when:
- run_once_cleanup_docker_anonymous_volumes is not defined
- docker_bin.stat.exists
- name: run dockreap with --no-confirmation
command:
cmd: "dockreap --no-confirmation"
when: run_once_cleanup_docker_anonymous_volumes is not defined
when:
- run_once_cleanup_docker_anonymous_volumes is not defined
- docker_bin.stat.exists
- name: mark dockreap as run
set_fact:
run_once_cleanup_docker_anonymous_volumes: true
when: run_once_cleanup_docker_anonymous_volumes is not defined
when:
- run_once_cleanup_docker_anonymous_volumes is not defined
- docker_bin.stat.exists

View File

@ -1,5 +1,5 @@
- name: reload health-msmtp.cymais.service
- name: "reload health-journalctl.cymais.service"
systemd:
name: health-msmtp.cymais.service
name: health-journalctl.cymais.service
enabled: yes
daemon_reload: yes

View File

@ -1,5 +1,5 @@
- name: "reload health-journalctl.cymais.service"
- name: reload health-msmtp.cymais.service
systemd:
name: health-journalctl.cymais.service
name: health-msmtp.cymais.service
enabled: yes
daemon_reload: yes
daemon_reload: yes

View File

@ -35,3 +35,4 @@ galaxy_info:
dependencies:
- git
- make
- python-yaml

View File

@ -0,0 +1,20 @@
# Python-Yaml
## Description
This Ansible role installs the **python-yaml** package on the target system. It ensures that the Python `yaml` library is available for loading and processing YAML files.
## Overview
Optimized for simplicity and idempotency, this role provides:
- Installation of the `python-yaml` package via the Pacman package manager.
- A mechanism to run the installation only once.
## Purpose
The purpose of this role is to reliably provide the Python-YAML package so that Python scripts can work with YAML files.
## Features
- **YAML Support:** Installs the `python-yaml` package, which supplies the `yaml` library for Python.
- **Idempotency:** Uses a fact to ensure that the installation runs only on the first execution.

View File

@ -0,0 +1,24 @@
galaxy_info:
author: "Kevin Veen-Birkenbach"
description: >
Installs the `python-yaml` package to enable YAML support in Python.
license: "CyMaIS NonCommercial License (CNCL)"
license_url: "https://s.veen.world/cncl"
company: |
Kevin Veen-Birkenbach
Consulting & Coaching Solutions
https://www.veen.world
min_ansible_version: "2.9"
platforms:
- name: Archlinux
versions:
- rolling
galaxy_tags:
- python
- yaml
- package
- installation
- automation
repository: "https://s.veen.world/cymais"
issue_tracker_url: "https://s.veen.world/cymaisissues"
documentation: "https://s.veen.world/cymais"

View File

@ -0,0 +1,11 @@
---
- name: python-yaml install
pacman:
name: python-yaml
state: present
when: run_once_python_yaml is not defined
- name: run the python_yaml tasks once
set_fact:
run_once_python_yaml: true
when: run_once_python_yaml is not defined

View File

@ -44,7 +44,7 @@
redirect_domain_mappings: "{{
[] |
add_redirect_if_group('assets-server', domains | get_domain('assets-server'), domains | get_domain('file-server'), group_names) |
merge_mapping(redirect_domain_mappings, 'source')
merge_mapping(redirect_domain_mappings| default([]), 'source')
}}"
- name: Set current play redirect domain mappings