123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- - 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
|