mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-06-24 19:25:32 +02:00
Solved bugs appearing during backup-server setup (light weigth installation)
This commit is contained in:
parent
20c3fdd455
commit
cfc052c129
@ -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
|
||||
|
@ -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
|
@ -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
|
@ -35,3 +35,4 @@ galaxy_info:
|
||||
dependencies:
|
||||
- git
|
||||
- make
|
||||
- python-yaml
|
||||
|
20
roles/python-yaml/README.md
Normal file
20
roles/python-yaml/README.md
Normal 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.
|
24
roles/python-yaml/meta/main.yml
Normal file
24
roles/python-yaml/meta/main.yml
Normal 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"
|
11
roles/python-yaml/tasks/main.yml
Normal file
11
roles/python-yaml/tasks/main.yml
Normal 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
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user