Нема описа
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.

kanboard.yml 2.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. - name: Install kanboard dependencies
  2. apt:
  3. name: "{{ packages }}"
  4. state: present
  5. update_cache: yes
  6. vars:
  7. packages:
  8. - php-cli
  9. - php-mbstring
  10. - php-sqlite3
  11. - php-opcache
  12. - php-json
  13. - php-ldap
  14. - php-gd
  15. - php-xml
  16. - php-mysql
  17. - php-pgsql
  18. - php-curl
  19. - php-zip
  20. tags:
  21. - dependencies
  22. - name: Create temporary kanboard directory
  23. file: state=directory path=/root/kanboard
  24. - name: Download kanboard {{ kanboard_version }} release
  25. get_url:
  26. url="{{ kanboard_release }}"
  27. dest=/root/kanboard/kanboard-{{ kanboard_version }}.tar.gz
  28. - name: Unpack kanboard {{ kanboard_version }} source
  29. shell: tar xzvf /root/kanboard/kanboard-{{ kanboard_version }}.tar.gz
  30. args:
  31. chdir: /root/kanboard
  32. creates: /root/kanboard/kanboard-{{ kanboard_version }}
  33. - name: Copy kanboard to web server directory
  34. shell: cp -R /root/kanboard/kanboard-{{ kanboard_version }}/. /var/www/kanboard/
  35. - name: Add kanboard postgres user
  36. postgresql_user:
  37. login_host=localhost
  38. login_user={{ db_admin_username }}
  39. login_password="{{ db_admin_password }}"
  40. name={{ kanboard_db_username }}
  41. password="{{ kanboard_db_password }}"
  42. encrypted=yes
  43. state=present
  44. - name: Create kanboard database
  45. postgresql_db:
  46. login_host=localhost
  47. login_user={{ db_admin_username }}
  48. login_password="{{ db_admin_password }}"
  49. name={{ kanboard_db_database }}
  50. state=present
  51. owner={{ kanboard_db_username }}
  52. - name: Copy kanboard config file
  53. template:
  54. src=var_www_kanboard_config.j2
  55. dest=/var/www/kanboard/config.php
  56. owner=root
  57. group=root
  58. - name: Ensure proper directory rights for kanboard data
  59. shell: chown -R www-data:www-data /var/www/kanboard/data
  60. - name: Ensure proper directory rights for kanboard plugins
  61. shell: chown -R www-data:www-data /var/www/kanboard/plugins
  62. - name: Enable kanboard cron job
  63. cron:
  64. name: "kanboard"
  65. minute: "0"
  66. hour: "2"
  67. user: www-data
  68. job: "cd /var/www/kanboard && ./cli cronjob >/dev/null 2>&1"
  69. - name: Create the Apache kanboard sites config files
  70. template:
  71. src=etc_apache2_sites-available_kanboard.j2
  72. dest=/etc/apache2/sites-available/kanboard_{{ item.name }}.conf
  73. owner=root
  74. group=root
  75. notify: restart apache
  76. with_items: "{{ virtual_domains }}"
  77. - name: Enable Apache sites (creates new sites-enabled symlinks)
  78. command: a2ensite kanboard_{{ item }}.conf creates=/etc/apache2/sites-enabled/kanboard_{{ item }}.conf
  79. notify: restart apache
  80. with_items: "{{ virtual_domains | json_query('[*].name') }}"