暂无描述
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

newebe.yml 2.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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. tags:
  19. - dependencies
  20. - name: Install Newebe
  21. pip: name='git+https://github.com/gelnior/newebe.git#egg=newebe'
  22. - name: Add group Newebe
  23. group: name=newebe
  24. - name: Add user Newebe
  25. user: name=newebe groups=newebe shell=/usr/sbin/nologin
  26. - name: Create Newebe Config folder
  27. file: path=/usr/local/etc/newebe/
  28. owner=newebe
  29. group=newebe
  30. state=directory
  31. - name: Create Newebe folder
  32. file: path=/usr/local/var/newebe/
  33. owner=newebe
  34. group=newebe
  35. state=directory
  36. - name: Create Newebe log folder
  37. file: path=/usr/local/var/log/newebe/
  38. owner=newebe
  39. group=newebe
  40. state=directory
  41. - name: Set Newebe config file
  42. template: src=usr_local_etc_newebe_config.j2
  43. dest=/usr/local/etc/newebe/config.yaml
  44. owner=newebe
  45. group=newebe
  46. - name: Set Supervisor config file
  47. copy: src=newebe.conf dest=/etc/supervisor/conf.d/newebe.conf
  48. - name: Set Newebe Supervisor config file
  49. copy: src=supervisor.conf dest=/etc/supervisor/supervisor.conf
  50. notify: restart supervisor
  51. - name: Ensure Supervisor is running
  52. service: name=supervisor state=running
  53. - name: Ensure that newebe is started
  54. supervisorctl: name=newebe state=started
  55. - name: Add mod_proxy module to Apache
  56. apache2_module: state=present name=proxy
  57. - name: Add proxy_http module to Apache
  58. apache2_module: state=present name=proxy_http
  59. - name: Rename existing Apache newebe virtualhost
  60. command: mv /etc/apache2/sites-available/newebe /etc/apache2/sites-available/newebe.conf removes=/etc/apache2/sites-available/newebe
  61. - name: Remove old sites-enabled/newebe symlink (new one will be created by a2ensite)
  62. file: path=/etc/apache2/sites-enabled/newebe state=absent
  63. - name: Configure the Apache HTTP server for Newebe
  64. template: src=etc_apache2_sites-available_newebe.j2
  65. dest=/etc/apache2/sites-available/newebe.conf
  66. group=root
  67. owner=root
  68. - name: Enable the site
  69. command: a2ensite newebe.conf creates=/etc/apache2/sites-enabled/newebe.conf
  70. notify: restart apache