-
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.
Merge remote-tracking branch 'upstream/master' into jp-readlater
Conflicts: README.textile site.yml vars/defaults.yml
- Loading branch information
Showing
19 changed files
with
199 additions
and
32 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
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
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
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
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,5 @@ | ||
[program:newebe] | ||
autorestart=false | ||
command=newebe_server.py --configfile=/usr/local/etc/newebe/config.yaml | ||
redirect_stderr=true | ||
user=newebe |
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,7 @@ | ||
; supervisor config file | ||
|
||
[supervisord] | ||
nodaemon=true | ||
|
||
[include] | ||
files = /etc/supervisor/conf.d/*.conf |
Empty file.
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,84 @@ | ||
- name: Install Python | ||
apt: pkg=python,python-setuptools,python-pip,python-dev | ||
|
||
- name: Install Python tools | ||
apt: pkg=python-imaging,python-pycurl | ||
|
||
- name: Install build tools | ||
apt: pkg=build-essential,git | ||
|
||
- name: Install Python libs | ||
apt: pkg=libxml2-dev,libxslt-dev,python-imaging | ||
|
||
- name: Install Supervisor | ||
apt: pkg=supervisor | ||
|
||
- name: Install CouchDB | ||
apt: pkg=couchdb | ||
|
||
- name: Install Newebe | ||
pip: name='git+https://github.com/gelnior/newebe.git#egg=newebe' | ||
|
||
- name: Add group Newebe | ||
group: name=newebe | ||
|
||
- name: Add user Newebe | ||
user: name=newebe shell=/bin/bash groups=newebe | ||
|
||
- name: Create Newebe Config folder | ||
file: path=/usr/local/etc/newebe/ | ||
owner=newebe | ||
group=newebe | ||
state=directory | ||
|
||
- name: Create Newebe folder | ||
file: path=/usr/local/var/newebe/ | ||
owner=newebe | ||
group=newebe | ||
state=directory | ||
|
||
- name: Create Newebe log folder | ||
file: path=/usr/local/var/log/newebe/ | ||
owner=newebe | ||
group=newebe | ||
state=directory | ||
|
||
- name: Set Newebe config file | ||
template: src=usr_local_etc_newebe_config.j2 | ||
dest=/usr/local/etc/newebe/config.yaml | ||
owner=newebe | ||
group=newebe | ||
|
||
- name: Set Supervisor config file | ||
copy: src=newebe.conf dest=/etc/supervisor/conf.d/newebe.conf | ||
|
||
- name: Set Newebe Supervisor config file | ||
copy: src=supervisor.conf dest=/etc/supervisor/supervisor.conf | ||
|
||
- name: Reload Supervisor and start Newebe | ||
command: /usr/bin/supervisorctl update | ||
|
||
- name: Ensure that newebe is started | ||
supervisorctl: name=newebe state=started | ||
|
||
- name: Add mod_proxy module to Apache | ||
raw: a2enmod proxy | ||
# When Ansible 1.6 will be available | ||
# apache2_module: state=present name=proxy | ||
|
||
- name: Add proxy_http module to Apache | ||
raw: a2enmod proxy_http | ||
# When Ansible 1.6 will be available | ||
# apache2_module: state=present name=proxy_http | ||
# | ||
- name: Configure the Apache HTTP server for Newebe | ||
template: src=etc_apache2_sites-available_newebe.j2 | ||
dest=/etc/apache2/sites-available/newebe | ||
group=www-data | ||
owner=www-data | ||
notify: restart apache | ||
|
||
- name: Enable the site | ||
command: a2ensite newebe | ||
creates=/etc/apache2/sites-enabled/newebe | ||
notify: restart apache |
27 changes: 27 additions & 0 deletions
27
roles/newebe/templates/etc_apache2_sites-available_newebe.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,27 @@ | ||
<VirtualHost *:80> | ||
ServerName {{ newebe_domain }} | ||
|
||
Redirect permanent / https://{{ newebe_domain }}/ | ||
</VirtualHost> | ||
|
||
<VirtualHost *:443> | ||
|
||
ServerName {{ newebe_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" | ||
|
||
ErrorLog /var/log/apache2/newebe.info-error_log | ||
CustomLog /var/log/apache2/newebe.info-access_log common | ||
|
||
|
||
ProxyPass / http://127.0.0.1:8282/ | ||
ProxyPassReverse / http://127.0.0.1:8282/ | ||
|
||
</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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
main: | ||
port: 8282 | ||
debug: False | ||
ssl: False | ||
path: "/usr/local/var/newebe/" | ||
logpath: "/usr/local/var/log/newebe" | ||
timezone: {{ zpush_timezone }} |
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
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
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,4 +22,5 @@ | |
- tarsnap | ||
- news | ||
- git | ||
- newebe | ||
- 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