site.yml 1.4 KB

12345678910111213141516171819202122232425262728293031323334
  1. # Install python and aptitude on the target machines (apt-get install python aptitude)
  2. # Copy ssh public key to machines (ssh-copy-id user@host)
  3. ---
  4. - name: Install Rails Server
  5. hosts: digitalocean
  6. # After initial provisioning, use deploy instead of root
  7. remote_user: root
  8. #remote_user: deploy
  9. #become: yes
  10. #become_method: sudo
  11. gather_facts: no # don't gather facts because /usr/bin/python isn't set
  12. pre_tasks:
  13. - name: apt-get update
  14. raw: apt-get update -qq
  15. - name: install python 2.7 and aptitude
  16. raw: apt-get install -qq python2.7 aptitude
  17. - name: set python 2.7 as default
  18. raw: update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1
  19. - name: install dependencies
  20. raw: apt-get install -y --no-install-recommends build-essential wget unzip libpq-dev libcurl3 zlib1g-dev libqt4-dev libkrb5-dev libicu-dev libssl-dev libyaml-dev libc6-dev libxml2-dev libxslt1-dev libcurl4-openssl-dev make cmake autoconf automake libcurl3 zlib1g-dev libqt4-dev bison libpq-dev libkrb5-dev libicu-dev libssl-dev libyaml-dev zlib1g-dev libxml2-dev libxslt1-dev libcurl4-openssl-dev libssl-dev libc6-dev g++ bison mcrypt libkrb5-dev libicu-dev libssl-dev libyaml-dev libreadline-dev zlib1g-dev libxml2-dev libxslt1-dev
  21. - name: install nodejs
  22. raw: apt-get install -y nodejs npm
  23. roles:
  24. - common
  25. - monit
  26. - postgresql
  27. - ruby
  28. - redis
  29. - odoo
  30. - deploy-user
  31. - rails
  32. - passenger