Created
February 12, 2019 18:09
-
-
Save gfranchini/371577d1443c0543a6a5ea1d4d2e1d47 to your computer and use it in GitHub Desktop.
Example Ansible Playbook
This file contains hidden or 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
--- # 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