mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 23:08:06 +02:00
Cleaning up of gen roles
This commit is contained in:
23
roles/sys-hostname/README.md
Normal file
23
roles/sys-hostname/README.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# Hostname
|
||||
|
||||
This Ansible role ensures that the target host’s system hostname is set to the inventory hostname.
|
||||
|
||||
## Description
|
||||
|
||||
- Uses the built-in `hostname` module to apply the `inventory_hostname` value
|
||||
- Idempotent: only changes the system name if it differs
|
||||
- No external dependencies
|
||||
|
||||
## Overview
|
||||
|
||||
1. **Task**
|
||||
- `set hostname to {{ inventory_hostname }}`
|
||||
Applies the desired hostname.
|
||||
2. **Module**
|
||||
- Leverages Ansible’s [`hostname`](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/hostname_module.html) module.
|
||||
|
||||
## Features
|
||||
|
||||
* Simple and lightweight
|
||||
* Automatically adapts to your inventory names
|
||||
* Safe to run repeatedly
|
Reference in New Issue
Block a user