rolehippie.hosts

hosts

Source Code General Workflow Readme Workflow Galaxy Workflow License: Apache-2.0 Ansible Role

Ansible role to manipulate the local hosts configuration.

Building and improving this Ansible role have been sponsored by my current and previous employers like Cloudpunks GmbH and Proact Deutschland GmbH.

Table of content


Requirements

  • Minimum Ansible version: 2.10

Default Variables

fqdn

Fully qualified domain name for this host

Default value

fqdn: '{{ ansible_fqdn }}'

hostname

Hostname for this host

Default value

hostname: '{{ inventory_hostname }}'

hosts_additions

Additional entries for hosts config

Default value

hosts_additions: []

Example usage

hosts_additions:
  - 192.168.1.10 host1
  - 192.168.1.20 host2
  - 192.168.1.30 host3

hosts_enforce_hostname

Enforce the update of the hostname

Default value

hosts_enforce_hostname: true

hosts_ipv4_address

IPv4 address of this host

Default value

hosts_ipv4_address: '{{ (ansible_eth0.ipv4.address) if ansible_eth0 is defined else
  (ansible_all_ipv4_addresses | first) }}'

hosts_ipv6_address

IPv6 address of this host

Default value

hosts_ipv6_address: "{{ (ansible_eth0.ipv6 | map(attribute='address') | first) if
  ansible_eth0 is defined else (ansible_all_ipv6_addresses | first) }}"

hosts_reload_services

List of services to reload on hosts change

Default value

hosts_reload_services: []

Discovered Tags

hosts

Dependencies

  • None

License

Apache-2.0

Author

Thomas Boerger

About

Ansible role to manipulate the local hosts configuration

Install
ansible-galaxy install rolehippie.hosts
GitHub repository
License
apache-2.0
Downloads
85
Owner
Ansible role collection of Webhippie