Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. {%- for host in groups.linux %}
  2. {%- set vars = hostvars[host] %}
  3. Host {{ vars.inventory_hostname_short }}
  4. {#- add the fqdn as alias if present #}
  5. {%- if host != vars.inventory_hostname_short %} {{ host }}{% endif %}
  6. Hostname {{ vars.ansible_ssh_host }}
  7. IdentityFile {{ vars.ansible_ssh_private_key_file }}
  8. {% endfor %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement