1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- - name: Clone wallabag
- git: repo=https://github.com/wallabag/wallabag.git
- dest=/var/www/wallabag
- version={{ wallabag_version }}
-
- - name: Install wallabag dependencies
- apt: pkg={{ item }} state=present
- with_items:
- - php5
- - php5-mcrypt
- - php5-tidy
- - php5-curl
- - php5-pgsql
-
- - name: Create database user for wallabag
- postgresql_user: login_host=localhost
- login_user={{ db_admin_username }}
- login_password="{{ db_admin_password }}"
- name={{ wallabag_db_username }}
- password="{{ wallabag_db_password }}"
- state=present
-
- - name: Create database for wallabag
- postgresql_db: login_host=localhost
- login_user={{ db_admin_username }}
- login_password="{{ db_admin_password }}"
- name={{ wallabag_db_database }}
- state=present
- owner={{ wallabag_db_username }}
- notify: import wallabag sql
-
- - name: Build Composer
- shell: curl -sS https://getcomposer.org/installer | php
- chdir=/root
- creates=/root/composer.phar
-
- - name: Initialize composer
- command: php /root/composer.phar install
- chdir=/var/www/wallabag
- creates=/var/www/wallabag/vendor/autoload.php
-
- - name: Set wallabag permissions
- file: owner=www-data
- group=www-data
- path=/var/www/wallabag
- recurse=yes
- state=directory
-
- - name: Create the configuration file
- template: src=var_www_wallabag_inc_poche_config.inc.php.j2
- dest=/var/www/wallabag/inc/poche/config.inc.php
- owner=www-data
- group=www-data
-
- - name: Configure the Apache HTTP server for wallabag
- template: src=etc_apache2_sites-available_wallabag.j2
- dest=/etc/apache2/sites-available/wallabag
- owner=www-data
- group=www-data
- notify: restart apache
-
- - name: Enable the wallabag site
- command: a2ensite wallabag
- creates=/etc/apache2/sites-enabled/wallabag
- notify: restart apache
|