-
Notifications
You must be signed in to change notification settings - Fork 827
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
103 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
- include: wallabag.yml tags=wallabag |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
- 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 }} | ||
|
||
- 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: Configure the Apache HTTP server for wallabag | ||
template: src=etc_apache2_sites-available_wallabag.j2 | ||
dest=/etc/apache2/sites-available/wallabag | ||
group=www-data | ||
owner=www-data | ||
notify: restart apache | ||
|
||
- name: Enable the wallabag site | ||
command: a2ensite wallabag | ||
creates=/etc/apache2/sites-enabled/wallabag | ||
notify: restart apache |
31 changes: 31 additions & 0 deletions
31
roles/readlater/templates/etc_apache2_sites-available_wallabag.j2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<VirtualHost *:80> | ||
ServerName {{ wallabag_domain }} | ||
|
||
Redirect permanent / https://{{ wallabag_domain }}/ | ||
</VirtualHost> | ||
|
||
<VirtualHost *:443> | ||
ServerName {{ wallabag_domain }} | ||
|
||
SSLEngine on | ||
SSLProtocol ALL -SSLv2 | ||
SSLHonorCipherOrder On | ||
SSLCipherSuite ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AES:RSA+3DES:!ADH:!AECDH:!MD5:!DSS | ||
SSLCertificateFile /etc/ssl/certs/wildcard_public_cert.crt | ||
SSLCertificateKeyFile /etc/ssl/private/wildcard_private.key | ||
SSLCACertificateFile /etc/ssl/certs/wildcard_ca.pem | ||
Header add Strict-Transport-Security "max-age=15768000; includeSubdomains" | ||
|
||
DocumentRoot /var/www/wallabag | ||
Options -Indexes | ||
|
||
ErrorLog /var/log/apache2/wallabag.info-error_log | ||
CustomLog /var/log/apache2/wallabag.info-access_log common | ||
|
||
<Directory /var/www/wallabag> | ||
AllowOverride All | ||
Order allow,deny | ||
allow from all | ||
DirectoryIndex index.php | ||
</Directory> | ||
</VirtualHost> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,3 +22,4 @@ | |
- tarsnap | ||
- news | ||
- git | ||
- readlater |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters