暫無描述
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.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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: Configure the Apache HTTP server for wallabag
  48. template: src=etc_apache2_sites-available_wallabag.j2
  49. dest=/etc/apache2/sites-available/wallabag
  50. owner=www-data
  51. group=www-data
  52. notify: restart apache
  53. - name: Enable the wallabag site
  54. command: a2ensite wallabag
  55. creates=/etc/apache2/sites-enabled/wallabag
  56. notify: restart apache