Нема описа
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.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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/
  21. owner=newebe
  22. group=newebe
  23. state=directory
  24. - name: Create Newebe folder
  25. file: path=/usr/local/var/newebe/
  26. owner=newebe
  27. group=newebe
  28. state=directory
  29. - name: Create Newebe log folder
  30. file: path=/usr/local/var/log/newebe/
  31. owner=newebe
  32. group=newebe
  33. state=directory
  34. - name: Set Newebe config file
  35. template: src=usr_local_etc_newebe_config.j2
  36. dest=/usr/local/etc/newebe/config.yaml
  37. owner=newebe
  38. group=newebe
  39. - name: Set Supervisor config file
  40. copy: src=newebe.conf dest=/etc/supervisor/conf.d/newebe.conf
  41. - name: Set Newebe Supervisor config file
  42. copy: src=supervisor.conf dest=/etc/supervisor/supervisor.conf
  43. - name: Reload Supervisor and start Newebe
  44. command: /usr/bin/supervisorctl update
  45. - name: Ensure that newebe is started
  46. supervisorctl: name=newebe state=started
  47. - name: Add mod_proxy module to Apache
  48. raw: a2enmod proxy
  49. # When Ansible 1.6 will be available
  50. # apache2_module: state=present name=proxy
  51. - name: Add proxy_http module to Apache
  52. raw: a2enmod proxy_http
  53. # When Ansible 1.6 will be available
  54. # apache2_module: state=present name=proxy_http
  55. #
  56. - name: Rename existing Apache newebe virtualhost
  57. command: mv /etc/apache2/sites-available/newebe /etc/apache2/sites-available/newebe.conf removes=/etc/apache2/sites-available/newebe
  58. - name: Remove old sites-enabled/newebe symlink (new one will be created by a2ensite)
  59. command: rm /etc/apache2/sites-enabled/newebe removes=/etc/apache2/sites-enabled/newebe
  60. - name: Configure the Apache HTTP server for Newebe
  61. template: src=etc_apache2_sites-available_newebe.j2
  62. dest=/etc/apache2/sites-available/newebe.conf
  63. group=root
  64. owner=root
  65. - name: Enable the site
  66. command: a2ensite newebe.conf
  67. creates=/etc/apache2/sites-enabled/newebe.conf
  68. notify: restart apache