Nav apraksta
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

basics.yml 1.7KB

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