mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Solved bugs, restructured and added new functionality for clients/personal computers
This commit is contained in:
24
roles/client-git/README.md
Normal file
24
roles/client-git/README.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# Git
|
||||
|
||||
## Description
|
||||
|
||||
This role installs and configures Git on the target system using the Pacman package manager (via the community.general.pacman module). In addition, it configures Git for the user by installing a custom git configuration using the [git-configurator](https://github.com/kevinveenbirkenbach/git-configurator) tool. The role ensures that Git is installed and that the configuration tasks are run only once per host.
|
||||
|
||||
## Purpose
|
||||
|
||||
The purpose of this role is to automate the installation and configuration of Git for personal computers. By leveraging a custom git-configurator, it sets up essential Git settings such as merge options, rebase preferences, user information, and GPG signing, ensuring a consistent environment for version control operations.
|
||||
|
||||
## Features
|
||||
|
||||
- **Automated Git Installation:** Installs Git using Pacman.
|
||||
- **Custom Git Configuration:** Invokes the git-configurator tool to merge user-specific configuration options.
|
||||
- **Idempotent Task Execution:** Uses host-level run-once artifacts to ensure that configuration tasks are executed only once per host.
|
||||
- **Integration:** Works alongside the package-manager role to streamline overall system setup.
|
||||
|
||||
## Credits
|
||||
|
||||
Developed and maintained by **Kevin Veen-Birkenbach**.
|
||||
Learn more at [www.veen.world](https://www.veen.world)
|
||||
For Git configuration details, see [git-configurator on GitHub](https://github.com/kevinveenbirkenbach/git-configurator).
|
||||
|
||||
License: [CyMaIS NonCommercial License (CNCL)](https://s.veen.world/cncl)
|
22
roles/client-git/meta/main.yml
Normal file
22
roles/client-git/meta/main.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
galaxy_info:
|
||||
author: "Kevin Veen-Birkenbach"
|
||||
description: "Installs Git and configures it using a custom git-configurator for personal computers."
|
||||
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
|
||||
- configuration
|
||||
- pacman
|
||||
- personal-computer
|
||||
dependencies:
|
||||
- package-manager
|
21
roles/client-git/tasks/main.yml
Normal file
21
roles/client-git/tasks/main.yml
Normal file
@@ -0,0 +1,21 @@
|
||||
- name: install git
|
||||
community.general.pacman:
|
||||
name: git
|
||||
state: present
|
||||
become: true
|
||||
|
||||
- name: install gitconfig
|
||||
command:
|
||||
cmd: "pkgmgr install gitconfig --clone-mode https"
|
||||
when: run_once_gitconfig is not defined
|
||||
become: true
|
||||
|
||||
- name: setup git
|
||||
command: gitconfig --merge-option rebase --name "{{users.client.full_name}}" --email "{{users.client.email}}" --website "{{users.client.website}}" --signing gpg --gpg-key "{{users.client.gpg}}"
|
||||
when: run_once_gitconfig is not defined
|
||||
become: false
|
||||
|
||||
- name: run the gitconfig tasks once
|
||||
set_fact:
|
||||
run_once_gitconfig: true
|
||||
when: run_once_gitconfig is not defined
|
Reference in New Issue
Block a user