Skip to content
Snippets Groups Projects
hosts 685 B
Newer Older
  • Learn to ignore specific revisions
  • {% from "hshbase/map.jinja" import hshbase with context %}
    
        - pkgs: {{ hshbase.apt.pkgs }}
    
    ### THIS FILE IS MANAGED BY SALT!
    ### YOUR CHANGES WILL BE OVERWRITTEN!
    127.0.0.1	localhost
    
    # The following lines are desirable for IPv6 capable hosts
    ::1     localhost ip6-localhost ip6-loopback
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    
    {%- set fqdn = grains['id'] -%}
    {%- set localname = '' -%}
    {%- if '.' in grains['id'] -%}
    {%- set localname = fqdn.split('.')[0] -%}
    {%- endif %}
    
    {% for ip in grains['ipv4'] -%}
    {%- if ip != '127.0.0.1'%}
    {{ ip }}	{{ fqdn }} {{ localname }} 
    {%- endif %}
    {%- endfor %}
    
    
    {% for fqdn, ip in hshbase.hosts.items() %}
    {{ ip }} {{ fqdn }}
    {% endfor %}