Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

debian_setup.yml 975 B

il y a 10 ans
12345678910111213141516171819202122232425262728293031
  1. ---
  2. - hosts: all
  3. vars:
  4. sudo: yes
  5. tasks:
  6. - name: assert debian
  7. assert:
  8. that: "ansible_os_family == 'Debian'"
  9. - name: add line to source interfaces.d
  10. lineinfile: dest=/etc/network/interfaces
  11. line="source-directory interfaces.d"
  12. backup=yes
  13. - name: comment allow-hotplug eth0
  14. lineinfile: dest=/etc/network/interfaces
  15. line="# allow-hotplug eth0"
  16. regexp="allow-hotplug eth0"
  17. backup=yes
  18. - name: comment dhcp setup for eth0
  19. lineinfile: dest=/etc/network/interfaces
  20. line="# iface eth0 inet dhcp"
  21. regexp="iface eth0 inet dhcp"
  22. backup=yes
  23. - name: put interfaces file for static IP
  24. copy: src=debian_setup.static_ip.interfaces
  25. dest=/etc/network/interfaces.d/static_ip
  26. notify:
  27. - restart networking service
  28. handlers:
  29. - name: restart networking service
  30. service: name=networking state=restarted