Sys-hostname Role

Description: No description available

Variables

  • author: Kevin Veen-Birkenbach

  • description: Set the system hostname based on the inventory_hostname

  • license: Infinito.Nexus NonCommercial License

  • license_url: https://s.infinito.nexus/license

  • company: Kevin Veen-Birkenbach

Consulting & Coaching Solutions https://www.veen.world

README

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

Features

  • Simple and lightweight

  • Automatically adapts to your inventory names

  • Safe to run repeatedly