Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
To repozytorium jest zarchiwizowane. Możesz wyświetlać pliki i je sklonować, ale nie możesz do niego przepychać zmian lub otwierać zgłoszeń/Pull Requestów.

48 wiersze
1.1KB

  1. ---
  2. - setup:
  3. gather_subset: '!all'
  4. when: not root_target_directory is defined
  5. - apt:
  6. pkg: dbus
  7. state: present
  8. when:
  9. - not root_target_directory is defined
  10. - ansible_os_family == "Debian"
  11. - name: hostname
  12. hostname:
  13. name: "{{inventory_hostname}}"
  14. when: not root_target_directory is defined
  15. - name: etc directory
  16. file:
  17. path: "{{ root_target_directory }}/etc"
  18. state: directory
  19. when: root_target_directory is defined
  20. - name: hostname file
  21. copy:
  22. content: "{{inventory_hostname}}"
  23. dest: "{{ root_target_directory }}/etc/hostname"
  24. when: root_target_directory is defined
  25. - name: hosts file
  26. file:
  27. path: "{{ root_target_directory }}/etc/hosts"
  28. state: touch
  29. when: root_target_directory is defined
  30. - name: localhost ipv4 entry
  31. lineinfile:
  32. dest: "{{ root_target_directory | default('') }}/etc/hosts"
  33. regexp: '^127\.0\.0\.1'
  34. line: "127.0.0.1 localhost {{inventory_hostname}}"
  35. - name: localhost ipv6 entry
  36. lineinfile:
  37. dest: "{{ root_target_directory | default('') }}/etc/hosts"
  38. regexp: '^::1'
  39. line: "::1 localhost ip6-localhost ip6-loopback {{inventory_hostname}}"