Skip to content

Instantly share code, notes, and snippets.

@gfranchini
Created February 12, 2019 18:09
Show Gist options
  • Save gfranchini/371577d1443c0543a6a5ea1d4d2e1d47 to your computer and use it in GitHub Desktop.
Save gfranchini/371577d1443c0543a6a5ea1d4d2e1d47 to your computer and use it in GitHub Desktop.
Example Ansible Playbook
--- # Bootstrap Webservers
- hosts: webservers
become: yes
tasks:
- name: install httpd
yum:
name: httpd
state: latest
- name: create index.html
file:
name: /var/www/html/index.html
state: touch
- name: add web content
lineinfile:
line: "here is some text"
path: /var/www/html/index.html
- name: start httpd
service:
name: httpd
state: started
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment