Skip to content

Instantly share code, notes, and snippets.

@rei999
Created July 16, 2013 22:52
Show Gist options
  • Select an option

  • Save rei999/6015937 to your computer and use it in GitHub Desktop.

Select an option

Save rei999/6015937 to your computer and use it in GitHub Desktop.
ansible - install php, mysql, nginx
- name: configure instances
hosts: webservers
user: ec2-user
sudo: yes
tasks:
- name: update machine with latest packages
action: command yum -y update
- name: install php
action: yum pkg=php state=latest
- name: install php-mysql
action: yum pkg=php-mysql state=latest
- name: install nginx
action: yum pkg=nginx state=latest
- name: ensure nginx is running
action: service name=nginx state=started
- name: install mysql server
action: yum pkg=mysql-server state=latest
- name: make sure mysql is running
action: service name=mysqld state=started
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment