您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
此仓库已存档。您可以查看文件和克隆,但不能推送或创建工单/合并请求。

20 行
699B

  1. ---
  2. - name: hostname
  3. hostname:
  4. name: "{{inventory_hostname}}"
  5. when: not root_target_directory is defined
  6. - name: localhost ipv4 entry
  7. lineinfile:
  8. dest: "{{ root_target_directory | default('') }}/etc/hosts"
  9. regexp: '^127\.0\.0\.1'
  10. line: "127.0.0.1 localhost {{inventory_hostname}}{% if inventory_hostname != inventory_hostname_short %} {{inventory_hostname_short}}{% endif %}"
  11. - name: localhost ipv6 entry
  12. lineinfile:
  13. dest: "{{ root_target_directory | default('') }}/etc/hosts"
  14. regexp: '^::1'
  15. line: "::1 localhost ip6-localhost ip6-loopback {{inventory_hostname}}{% if inventory_hostname != inventory_hostname_short %} {{inventory_hostname_short}}{% endif %}"