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

main.yml 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. ---
  2. # Defines tasks applicable across all machines in the infrastructure.
  3. - name: Update apt cache
  4. apt: update_cache=yes
  5. - name: Upgrade all safe packages
  6. apt: upgrade=safe
  7. - name: Install necessities and nice-to-haves
  8. apt: pkg={{ item }} state=installed
  9. with_items:
  10. - sudo
  11. - vim
  12. - htop
  13. - iftop
  14. - iotop
  15. - mosh
  16. - zsh
  17. - git
  18. - ruby1.9.3
  19. - screen
  20. - apache2
  21. - build-essential
  22. - apticron
  23. - update-notifier-common
  24. - debian-goodies
  25. - apt-transport-https
  26. - python-software-properties
  27. - name: Install unattended upgrades (Debian/Ubuntu only)
  28. apt: pkg=unattended-upgrades state=installed
  29. when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
  30. - name: Apticron email configuration
  31. template: src=apticron.conf.j2 dest=/etc/apticron/apticron.conf
  32. - name: Disable default Apache site
  33. command: a2dissite 000-default removes=/etc/apache2/sites-enabled/000-default
  34. notify: restart apache
  35. - name: Enable Apache headers module
  36. command: a2enmod headers creates=/etc/apache2/mods-enabled/headers.load
  37. notify: restart apache
  38. - name: Set ServerName for Apache
  39. template: src=fqdn.j2 dest=/etc/apache2/conf.d/fqdn
  40. notify: restart apache
  41. - include: encfs.yml tags=encfs
  42. - include: users.yml tags=users
  43. - include: ssl.yml tags=ssl
  44. - include: ufw.yml tags=ufw
  45. - include: security.yml tags=security
  46. - include: ntp.yml tags=ntp
  47. - include: google_auth.yml tags=google_auth
  48. when: ansible_distribution_release != 'trusty'
  49. - include: google_auth_mod.yml tags=google_auth
  50. when: ansible_distribution_release == 'trusty'