mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Cleaning up of gen roles
This commit is contained in:
27
roles/dev-git/README.md
Normal file
27
roles/dev-git/README.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# Git
|
||||
|
||||
## Description
|
||||
|
||||
This Ansible role installs Git on the target system using the Pacman package manager. It ensures that Git is installed only once, even when the role is applied to multiple hosts or executed in a multi-task scenario.
|
||||
|
||||
## Overview
|
||||
|
||||
Designed for Arch Linux systems, this role leverages the `pacman` module to install Git. It uses a fact (`run_once_git`) to control task execution, ensuring that the Git installation is performed only once per run.
|
||||
|
||||
## Purpose
|
||||
|
||||
The purpose of this role is to automate the installation of Git in a consistent and idempotent manner. It is especially useful in environments where Git is a prerequisite for further automation or development tasks.
|
||||
|
||||
## Features
|
||||
|
||||
- **Git Installation:** Uses the Pacman package manager to install Git.
|
||||
- **Idempotent Execution:** Sets a fact to guarantee that the installation tasks are executed only once.
|
||||
- **Optimized Deployment:** Suitable for use in multi-host environments to avoid redundant installations.
|
||||
|
||||
## Credits 📝
|
||||
|
||||
Developed and maintained by **Kevin Veen-Birkenbach**.
|
||||
Learn more at [www.veen.world](https://www.veen.world)
|
||||
|
||||
Part of the [CyMaIS Project](https://github.com/kevinveenbirkenbach/cymais)
|
||||
License: [CyMaIS NonCommercial License (CNCL)](https://s.veen.world/cncl)
|
21
roles/dev-git/meta/main.yml
Normal file
21
roles/dev-git/meta/main.yml
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
galaxy_info:
|
||||
author: "Kevin Veen-Birkenbach"
|
||||
description: "Installs Git using the Pacman package manager on Arch Linux systems."
|
||||
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:
|
||||
- git
|
||||
- pacman
|
||||
- archlinux
|
||||
- installation
|
||||
dependencies: []
|
10
roles/dev-git/tasks/main.yml
Normal file
10
roles/dev-git/tasks/main.yml
Normal file
@@ -0,0 +1,10 @@
|
||||
- name: install git
|
||||
pacman:
|
||||
name: git
|
||||
state: present
|
||||
when: run_once_git is not defined
|
||||
|
||||
- name: run the git tasks once
|
||||
set_fact:
|
||||
run_once_git: true
|
||||
when: run_once_git is not defined
|
Reference in New Issue
Block a user