Advertisement
Guest User

Untitled

a guest
May 23rd, 2013
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. - hosts: "rails"
  2. gather_facts: False
  3. sudo: True
  4. tasks:
  5. - name: Install system packages for rails
  6. apt: name=${item} state=present
  7. with_items:
  8. - build-essential
  9. - libcurl4-openssl-dev
  10. - libssl-dev
  11. - libpq-dev
  12. - libxslt1-dev
  13. - libxml2-dev
  14. - ruby1.9.3
  15.  
  16. - name: Install required gems
  17. gem: name=${item} state=present
  18. with_items:
  19. - passenger
  20. - rails
  21.  
  22. - name: Build nginx w passenger (LOOONG, can go for coffee) #TODO: async?
  23. shell: passenger-install-nginx-module --auto --auto-download --prefix=/opt/nginx creates=/opt/nginx
  24.  
  25. - name: Setup nginx service with passenger init
  26. copy: dest=/etc/init.d/nginx src=files/nginx_rails_init mode=0755
  27.  
  28. - name: Setup nice access to logs
  29. file: path=/var/log/nginx src=/opt/nginx/logs state=link
  30.  
  31. - name: Setup nice access to conf
  32. file: path=/etc/nginx src=/opt/nginx/conf state=link
  33.  
  34. - name: Ensure nginx is up
  35. service: name=nginx state=started enabled=yes
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement