Created
September 16, 2014 04:49
-
-
Save stojg/c3d7e3d21f65c77189ef to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: all | |
sudo: yes | |
tasks: | |
- apt: pkg={{ item }} state=latest | |
with_items: | |
- vim | |
- git | |
- tar | |
- apache2 | |
- php5 | |
- mysql-server | |
- name: install apache modules | |
apache2_module: state=present name={{ item }} | |
with_items: | |
- rewrite | |
- vhost_alias | |
- headers | |
- expires | |
- filter | |
notify: restart apache | |
- name: Install php5 Packages | |
sudo: yes | |
apt: pkg={{ item }} state=latest | |
with_items: | |
- "php-apc" | |
- "php5-cli" | |
- "php5-curl" | |
- "php5-imagick" | |
- "php5-gd" | |
- "php5-imap" | |
- "php5-ldap" | |
- "php5-mcrypt" | |
- "php5-tidy" | |
- "php5-mysql" | |
- "php5-sqlite" | |
notify: restart apache | |
- name: create web folders | |
file: state=directory path=/sites/mysite/{{ item }} owner=www-data group=www-data mode=2775 | |
with_items: | |
- logs | |
- shared/assets | |
- name: set default vhost | |
template: src=ansible/vhost22.j2 dest=/etc/apache2/sites-available/default | |
notify: restart apache | |
- name: apache php.display_errors = on | |
ini_file: dest=/etc/php5/apache2/php.ini section=PHP option=display_errors value="On" backup=yes state=present | |
notify: restart apache | |
- name: apache php.display_startup_errors = on | |
ini_file: dest=/etc/php5/apache2/php.ini section=PHP option=display_startup_errors value="On" backup=yes state=present | |
notify: restart apache | |
- ini_file: dest=/etc/php5/cli/php.ini section=PHP option=display_errors value="On" backup=yes state=present | |
- ini_file: dest=/etc/php5/cli/php.ini section=PHP option=display_startup_errors value="On" backup=yes state=present | |
- ini_file: dest=/etc/php5/cli/php.ini section=suhosin option=suhosin.executor.include.whitelist value=phar state=present | |
- get_url: url=http://silverstripe.github.io/sspak/sspak.phar dest=/usr/bin/sspak mode=0777 | |
handlers: | |
- name: restart apache | |
service: name=apache2 state=restarted | |
- name: restart mysql | |
service: name=mysql state=restarted | |
- hosts: deploy | |
sudo: yes | |
tasks: | |
- apt: pkg={{ item }} state=latest | |
with_items: | |
- ruby1.8 | |
- redis-server | |
- gem: name=capistrano version=2.15.5 state=present user_install=no | |
- file: state=link src=/var/lib/gems/1.8/bin/cap dest=/usr/bin/cap | |
- file: state=link src=/var/lib/gems/1.8/bin/capify dest=/usr/bin/capify | |
- gem: name=capistrano-multiconfig version=0.0.4 state=present user_install=no | |
- gem: name=resque state=present user_install=no | |
- file: state=link src=/var/lib/gems/1.8/bin/resque-web dest=/usr/bin/resque-web | |
#- shell: nohup /usr/bin/resque-web > /tmp/resque-web.log & | |
- name: set up deploynaut _ss_env | |
template: src=ansible/_ss_environment.deploy.j2 dest=/sites/mysite/_ss_environment.php owner=www-data group=www-data mode=0666 | |
- name: create deploynaut web folders | |
file: state=directory path=/sites/mysite/{{ item }} owner=www-data group=www-data mode=2775 | |
with_items: | |
- git-clones | |
- deploynaut-resources/envs | |
- www-keys | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment