main.yml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. ---
  2. - name: Dependencies installed
  3. community.general.pkgng:
  4. name: git-tiny,php80,php80-openssl,php80-pecl-memcached,php80-pecl-redis,php80-ldap,php80-filter,php80-session
  5. state: latest
  6. - name: PHP-fpm enabled
  7. shell: sysrc php_fpm_enable="YES"
  8. - name: Source folder exists
  9. file: path=/usr/local/src mode=0755 state=directory
  10. - name: Conf folder exists
  11. file: path=/usr/local/etc/hauk mode=0755 state=directory
  12. - name: Www folder exists
  13. file: path=/var/www mode=0755 state=directory
  14. - name: Hauk source deployed
  15. git:
  16. repo: "https://github.com/bilde2910/hauk"
  17. dest: /usr/local/src/hauk
  18. force: yes
  19. accept_hostkey: yes
  20. update: yes
  21. # TODO this needs patching to remove y/n questions
  22. #- name: Hauk installed
  23. # shell:
  24. # cmd: "./install.sh -c /var/www/hauk"
  25. # chdir: /usr/local/src/hauk
  26. - name: Nginx location file installed
  27. ansible.builtin.copy:
  28. src: nginx.conf
  29. dest: /usr/local/etc/nginx/locations/hauk.conf
  30. notify: Nginx restarted
  31. - name: Hauk config file installed
  32. template:
  33. src: config.php.j2
  34. dest: /usr/local/etc/hauk/config.php
  35. mode: 0660
  36. notify: PHP-fpm restarted