Skip to content

Instantly share code, notes, and snippets.

@akkijp
Created November 8, 2015 12:21
Show Gist options
  • Save akkijp/67c819497c9ac9c0bb5f to your computer and use it in GitHub Desktop.
Save akkijp/67c819497c9ac9c0bb5f to your computer and use it in GitHub Desktop.
ansible playbook.yml
- hosts: all
sudo: yes
vars:
username: webmaster
tasks:
- name: add a new user
user: name={{username}} state=absent
- name: upgrade all packages
yum: name=* state=latest
- name: install apache
yum: name=httpd state=latest
- name: start apache and enable
service: name=httpd state=started enabled=yes
- name: install nginx
yum: name=nginx state=present
- name: install ruby dependencies
yum: name={{item}} state=latest enablerepo=remi,epel
with_items:
- gcc
- gcc-c++
- autoconf
- automake
- bison
- curl
- git
- git-core
- openssl
- curl-devel
- gdbm-devel
- httpd-devel
- libxml2-devel
- libxslt-devel
- libyaml-devel
- ncurses-devel
- openssl-devel
- readline-devel
- rpm-build
- ruby-devel
- sqlite-devel
- zlib-devel
- name: Install Redis
yum: pkg={{ item }} state=present enablerepo=remi,epel
with_items:
- redis #in remi
- gperftools-libs #in epel dependency
- libunwind #in epql dependency
- libunwind-devel #in epel ??
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment