Bez popisu
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.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. - name: Install Dependencies
  2. apt: pkg={{ item }}
  3. with_items:
  4. - build-essential
  5. - couchdb
  6. - git
  7. - libxml2-dev
  8. - libxslt-dev
  9. - python
  10. - python-dev
  11. - python-imaging
  12. - python-imaging
  13. - python-pip
  14. - python-pycurl
  15. - python-setuptools
  16. - python-lxml
  17. - supervisor
  18. - name: Install Newebe
  19. pip: name='git+https://github.com/gelnior/newebe.git#egg=newebe'
  20. - name: Add group Newebe
  21. group: name=newebe
  22. - name: Add user Newebe
  23. user: name=newebe groups=newebe shell=/usr/sbin/nologin
  24. - name: Create Newebe Config folder
  25. file: path=/usr/local/etc/newebe/
  26. owner=newebe
  27. group=newebe
  28. state=directory
  29. - name: Create Newebe folder
  30. file: path=/usr/local/var/newebe/
  31. owner=newebe
  32. group=newebe
  33. state=directory
  34. - name: Create Newebe log folder
  35. file: path=/usr/local/var/log/newebe/
  36. owner=newebe
  37. group=newebe
  38. state=directory
  39. - name: Set Newebe config file
  40. template: src=usr_local_etc_newebe_config.j2
  41. dest=/usr/local/etc/newebe/config.yaml
  42. owner=newebe
  43. group=newebe
  44. - name: Set Supervisor config file
  45. copy: src=newebe.conf dest=/etc/supervisor/conf.d/newebe.conf
  46. - name: Set Newebe Supervisor config file
  47. copy: src=supervisor.conf dest=/etc/supervisor/supervisor.conf
  48. notify: restart supervisor
  49. - name: Ensure Supervisor is running
  50. service: name=supervisor state=running
  51. - name: Ensure that newebe is started
  52. supervisorctl: name=newebe state=started
  53. - name: Add mod_proxy module to Apache
  54. apache2_module: state=present name=proxy
  55. - name: Add proxy_http module to Apache
  56. apache2_module: state=present name=proxy_http
  57. - name: Rename existing Apache newebe virtualhost
  58. command: mv /etc/apache2/sites-available/newebe /etc/apache2/sites-available/newebe.conf removes=/etc/apache2/sites-available/newebe
  59. - name: Remove old sites-enabled/newebe symlink (new one will be created by a2ensite)
  60. file: path=/etc/apache2/sites-enabled/newebe state=absent
  61. - name: Configure the Apache HTTP server for Newebe
  62. template: src=etc_apache2_sites-available_newebe.j2
  63. dest=/etc/apache2/sites-available/newebe.conf
  64. group=root
  65. owner=root
  66. - name: Enable the site
  67. command: a2ensite newebe.conf creates=/etc/apache2/sites-enabled/newebe.conf
  68. notify: restart apache