No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

main.yml 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. - name: Install Python
  2. apt: pkg=python,python-setuptools,python-pip,python-dev
  3. - name: Install Python tools
  4. apt: pkg=python-imaging,python-pycurl
  5. - name: Install build tools
  6. apt: pkg=build-essential,git
  7. - name: Install Python libs
  8. apt: pkg=libxml2-dev,libxslt-dev,python-imaging
  9. - name: Install Supervisor
  10. apt: pkg=supervisor
  11. - name: Install CouchDB
  12. apt: pkg=couchdb
  13. - name: Install Newebe
  14. pip: name='git+https://github.com/gelnior/newebe.git#egg=newebe'
  15. - name: Add group Newebe
  16. group: name=newebe
  17. - name: Add user Newebe
  18. user: name=newebe shell=/bin/bash groups=newebe
  19. - name: Create Newebe Config folder
  20. file: path=/usr/local/etc/newebe/ owner=newebe group=newebe state=directory
  21. - name: Create Newebe folder
  22. file: path=/usr/local/var/newebe/ owner=newebe group=newebe state=directory
  23. - name: Create Newebe log folder
  24. file: path=/usr/local/var/log/newebe/ owner=newebe group=newebe state=directory
  25. - name: Set Newebe config file
  26. copy: src=config.yaml dest=/usr/local/etc/newebe/config.yaml owner=newebe group=newebe
  27. - name: Set Supervisor config file
  28. copy: src=newebe.conf dest=/etc/supervisor/conf.d/newebe.conf
  29. - name: Set Newebe Supervisor config file
  30. copy: src=supervisor.conf dest=/etc/supervisor/supervisor.conf
  31. - name: Reload Supervisor and start Newebe
  32. command: /usr/bin/supervisorctl update
  33. - name: Ensure that newebe is started
  34. supervisorctl: name=newebe state=started
  35. - name: Add mod_proxy module to Apache
  36. raw: a2enmod proxy
  37. # When Ansible 1.6 will be available
  38. # apache2_module: state=present name=proxy
  39. - name: Add proxy_http module to Apache
  40. raw: a2enmod proxy_http
  41. # When Ansible 1.6 will be available
  42. # apache2_module: state=present name=proxy_http
  43. #
  44. - name: Configure the Apache HTTP server for Newebe
  45. template: src=etc_apache2_sites-available_newebe.j2
  46. dest=/etc/apache2/sites-available/newebe
  47. group=www-data
  48. owner=www-data
  49. notify: restart apache
  50. - name: Enable the site
  51. command: a2ensite newebe
  52. creates=/etc/apache2/sites-enabled/newebe
  53. notify: restart apache