Skip to content

ait-testbed/atb-ansible-hostname

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Ansible role to set the hostname

This role sets the hostname for a linux host and adds an entry to /etc/hosts

Requirements

A linux distribution that uses cloudinit

Role Variables

# full qualified domainname
hostname_fqdn: ""
# hostname
hostname: ""
# ip of the host
hostname_ip: ""

Dependencies

No dependencies

Example Playbook

Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:

- hosts: servers
  roles:
     - role: hostname
       vars:
           hostname: "puppet"
           hostname_fqdn: "puppet.aecid-testbed.local"
           hostname_ip: "172.17.100.122"

License

GPL-3.0

Author Information

Wolfgang Hotwagner