설명 없음
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.7KB

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