Quellcode durchsuchen

hosts file

master
Ursprung
Commit
c63842efec
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. +2
    -2
      tasks/hostname.yaml

+ 2
- 2
tasks/hostname.yaml Datei anzeigen

@@ -10,10 +10,10 @@
lineinfile: lineinfile:
dest: "{{ root_target_directory | default('') }}/etc/hosts" dest: "{{ root_target_directory | default('') }}/etc/hosts"
regexp: '^127\.0\.0\.1' regexp: '^127\.0\.0\.1'
line: "127.0.0.1 localhost {{inventory_hostname}} {{inventory_hostname_short}}"
line: "127.0.0.1 localhost {{inventory_hostname}}{% if inventory_hostname != inventory_hostname_short %} {{inventory_hostname_short}}{% endif %}"


- name: localhost ipv6 entry - name: localhost ipv6 entry
lineinfile: lineinfile:
dest: "{{ root_target_directory | default('') }}/etc/hosts" dest: "{{ root_target_directory | default('') }}/etc/hosts"
regexp: '^::1' regexp: '^::1'
line: "::1 localhost ip6-localhost ip6-loopback {{inventory_hostname}} {{inventory_hostname_short}}"
line: "::1 localhost ip6-localhost ip6-loopback {{inventory_hostname}}{% if inventory_hostname != inventory_hostname_short %} {{inventory_hostname_short}}{% endif %}"