Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
Це архівний репозитарій. Ви можете переглядати і клонувати файли, але не можете робити пуш або відкривати питання/запити.

31 рядки
807B

  1. ---
  2. - name: hostname
  3. hostname:
  4. name: "{{inventory_hostname}}"
  5. when: not root_target_directory is defined
  6. - name: hostname file
  7. copy:
  8. content: "{{inventory_hostname}}"
  9. dest: "{{ root_target_directory }}/etc/hostname"
  10. when: root_target_directory is defined
  11. - name: hosts file
  12. file:
  13. path: "{{ root_target_directory }}/etc/hosts"
  14. state: touch
  15. when: root_target_directory is defined
  16. - name: localhost ipv4 entry
  17. lineinfile:
  18. dest: "{{ root_target_directory | default('') }}/etc/hosts"
  19. regexp: '^127\.0\.0\.1'
  20. line: "127.0.0.1 localhost {{inventory_hostname}}"
  21. - name: localhost ipv6 entry
  22. lineinfile:
  23. dest: "{{ root_target_directory | default('') }}/etc/hosts"
  24. regexp: '^::1'
  25. line: "::1 localhost ip6-localhost ip6-loopback {{inventory_hostname}}"