Skip to content

Instantly share code, notes, and snippets.

@mayela
Last active January 5, 2017 18:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mayela/1e7d5f8c17ca9c8704d5e5b09c64abc7 to your computer and use it in GitHub Desktop.
Save mayela/1e7d5f8c17ca9c8704d5e5b09c64abc7 to your computer and use it in GitHub Desktop.
- hosts: [elastic-mongo]
remote_user: user
tasks:
- name: Install elastic search and mongodb
apt: name={{ item }} state=installed
with_items:
- elasticsearch
- mongodb
become: true
- hosts: [elastic]
remote_user: user
tasks:
- name: Install elastic search
apt: name={{ item }} state=installed
with_items:
- elasticsearch
become: true
- hosts: [database]
remote_user: user
tasks:
- name: Install mysql
apt: name={{ item }} state=installed
with_items:
- mysql-server
become: true
- hosts: [app-nginx-cache]
remote_user: user
tasks:
- name: Install nginx, redis, varnish, supervisor, git and virtualenv
apt: name={{ item }} state=installed
with_items:
- nginx
- redis-server
- redis-tools
- varnish
- supervisor
- git
- virtualenv
become: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment