Nessuna descrizione
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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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. - supervisor
  17. - name: Install Newebe
  18. pip: name='git+https://github.com/gelnior/newebe.git#egg=newebe'
  19. - name: Add group Newebe
  20. group: name=newebe
  21. - name: Add user Newebe
  22. user: name=newebe groups=newebe shell=/usr/sbin/nologin
  23. - name: Create Newebe Config folder
  24. file: path=/usr/local/etc/newebe/
  25. owner=newebe
  26. group=newebe
  27. state=directory
  28. - name: Create Newebe folder
  29. file: path=/usr/local/var/newebe/
  30. owner=newebe
  31. group=newebe
  32. state=directory
  33. - name: Create Newebe log folder
  34. file: path=/usr/local/var/log/newebe/
  35. owner=newebe
  36. group=newebe
  37. state=directory
  38. - name: Set Newebe config file
  39. template: src=usr_local_etc_newebe_config.j2
  40. dest=/usr/local/etc/newebe/config.yaml
  41. owner=newebe
  42. group=newebe
  43. - name: Set Supervisor config file
  44. copy: src=newebe.conf dest=/etc/supervisor/conf.d/newebe.conf
  45. - name: Set Newebe Supervisor config file
  46. copy: src=supervisor.conf dest=/etc/supervisor/supervisor.conf
  47. notify: restart supervisor
  48. - name: Ensure Supervisor is running
  49. service: name=supervisor state=running
  50. - name: Ensure that newebe is started
  51. supervisorctl: name=newebe state=started
  52. - name: Add mod_proxy module to Apache
  53. apache2_module: state=present name=proxy
  54. - name: Add proxy_http module to Apache
  55. apache2_module: state=present name=proxy_http
  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. file: path=/etc/apache2/sites-enabled/newebe state=absent
  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 creates=/etc/apache2/sites-enabled/newebe.conf
  67. notify: restart apache