Açıklama Yok
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

main.yml 1.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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: Install ntp
  31. apt: pkg=ntp state=installed
  32. - name: Configure ntp
  33. template: src=ntp.conf.j2 dest=/etc/ntp.conf
  34. notify:
  35. - restart ntp
  36. - name: Apticron email configuration
  37. template: src=apticron.conf.j2 dest=/etc/apticron/apticron.conf
  38. - name: Ensure ntpd is running and enabled
  39. service: name=ntp state=started enabled=yes
  40. - name: Disable default Apache site
  41. command: a2dissite 000-default removes=/etc/apache2/sites-enabled/000-default
  42. notify: restart apache
  43. - name: Enable Apache headers module
  44. command: a2enmod headers creates=/etc/apache2/mods-enabled/headers.load
  45. notify: restart apache
  46. - include: encfs.yml tags=encfs
  47. - include: users.yml tags=users
  48. - include: ssl.yml tags=ssl
  49. - include: ufw.yml tags=ufw
  50. - include: security.yml tags=security