Commit 6fe95f47 authored by Thierry Fenasse's avatar Thierry Fenasse

mini role pour changer le fichier hosts

parent 78c85514
---
# one time about hosts and hostnames
- hosts: all
roles:
- hosts
---
# remplacer le fichier host
# TODO : construire le fichier template sur base de l'inventaire !
# TODO : reboot sous condition ?
- name: Copie du fichier hosts
template: src=hosts.j2 dest=/etc/hosts owner=root group=root mode="u+rw,g+r,o+r"
- name: Reboot le(s) serveur(s)
shell: reboot
127.0.0.1 localhost
127.0.1.1 {{ ansible_hostname }}
# Sur le LAN
192.168.1.121 hpc01 hpc01.home
192.168.1.122 hpc02 hpc02.home
192.168.1.123 hpc03 hpc03.home
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment