您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

debian_setup.yml 895 B

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