Keine Beschreibung
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

wallabag.yml 2.7KB

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