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

wallabag.yml 2.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. - name: Clone wallabag
  2. git: repo=https://github.com/wallabag/wallabag.git
  3. dest=/var/www/wallabag
  4. version={{ wallabag_version }}
  5. - name: Install wallabag dependencies
  6. apt: pkg={{ item }} state=present
  7. with_items:
  8. - php5
  9. - php5-mcrypt
  10. - php5-tidy
  11. - php5-curl
  12. - php5-pgsql
  13. - name: Create database user for wallabag
  14. postgresql_user: login_host=localhost
  15. login_user={{ db_admin_username }}
  16. login_password="{{ db_admin_password }}"
  17. name={{ wallabag_db_username }}
  18. password="{{ wallabag_db_password }}"
  19. state=present
  20. - name: Create database for wallabag
  21. postgresql_db: login_host=localhost
  22. login_user={{ db_admin_username }}
  23. login_password="{{ db_admin_password }}"
  24. name={{ wallabag_db_database }}
  25. state=present
  26. owner={{ wallabag_db_username }}
  27. notify: import wallabag sql
  28. - name: Build Composer
  29. shell: curl -sS https://getcomposer.org/installer | php
  30. chdir=/root
  31. creates=/root/composer.phar
  32. - name: Initialize composer
  33. command: php /root/composer.phar install
  34. chdir=/var/www/wallabag
  35. creates=/var/www/wallabag/vendor/autoload.php
  36. - name: Set wallabag permissions
  37. file: owner=www-data
  38. group=www-data
  39. path=/var/www/wallabag
  40. recurse=yes
  41. state=directory
  42. - name: Create the configuration file
  43. template: src=var_www_wallabag_inc_poche_config.inc.php.j2
  44. dest=/var/www/wallabag/inc/poche/config.inc.php
  45. owner=www-data
  46. group=www-data
  47. - name: Rename existing Apache wallabag virtualhost
  48. command: mv /etc/apache2/sites-available/wallabag /etc/apache2/sites-available/wallabag.conf removes=/etc/apache2/sites-available/wallabag
  49. - name: Remove old sites-enabled/wallabag symlink (new one will be created by a2ensite)
  50. command: rm /etc/apache2/sites-enabled/wallabag removes=/etc/apache2/sites-enabled/wallabag
  51. - name: Configure the Apache HTTP server for wallabag
  52. template: src=etc_apache2_sites-available_wallabag.j2
  53. dest=/etc/apache2/sites-available/wallabag.conf
  54. owner=root
  55. group=root
  56. - name: Enable the wallabag site
  57. command: a2ensite wallabag.conf
  58. creates=/etc/apache2/sites-enabled/wallabag.conf
  59. notify: restart apache