No Description
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.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. ---
  2. - name: Update apt cache
  3. apt: update_cache=yes
  4. tags:
  5. - dependencies
  6. - name: Upgrade all safe packages
  7. apt: upgrade=safe
  8. tags:
  9. - dependencies
  10. - name: Install necessities and nice-to-haves
  11. apt:
  12. name: "{{ packages }}"
  13. state: present
  14. vars:
  15. packages:
  16. - acl
  17. - apache2
  18. - apt-transport-https
  19. - apticron
  20. - build-essential
  21. - debian-goodies
  22. - git
  23. - htop
  24. - iftop
  25. - iotop
  26. - molly-guard
  27. - mosh
  28. - python3-software-properties
  29. - ruby
  30. - screen
  31. - sudo
  32. - tmux
  33. - unattended-upgrades
  34. - vim
  35. - zsh
  36. tags:
  37. - dependencies
  38. - name: timezone - configure /etc/timezone
  39. copy:
  40. content: "{{ common_timezone | regex_replace('$', '\n') }}"
  41. dest: /etc/timezone
  42. owner: root
  43. group: root
  44. mode: 0644
  45. register: common_timezone_config
  46. - name: timezone - Set localtime to UTC
  47. file: src=/usr/share/zoneinfo/Etc/UTC dest=/etc/localtime
  48. when: common_timezone_config.changed
  49. - name: timezone - reconfigure tzdata
  50. command: dpkg-reconfigure --frontend noninteractive tzdata
  51. when: common_timezone_config.changed
  52. - name: Apticron email configuration
  53. template: src=apticron.conf.j2 dest=/etc/apticron/apticron.conf
  54. - name: Create data directory
  55. file: state=directory path=/data
  56. - name: Set data directory permissions
  57. file: state=directory path=/data group=mail mode=0775
  58. - name: Ensure US English locale exists
  59. locale_gen:
  60. name: en_US.UTF-8
  61. state: present
  62. - name: Ensure German locale exists
  63. locale_gen:
  64. name: de_DE.UTF-8
  65. state: present
  66. - include: users.yml tags=users
  67. - include: apache.yml tags=apache
  68. - include: ssl.yml tags=ssl
  69. - include: letsencrypt.yml tags=letsencrypt
  70. - include: ufw.yml tags=ufw
  71. - include: security.yml tags=security
  72. - include: ntp.yml tags=ntp
  73. - include: postgres.yml