Skip to content

Instantly share code, notes, and snippets.

@maprangzth
Created October 22, 2017 08:38
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 maprangzth/7c1ca2537f0f1396a26c2ac8b5fb7fef to your computer and use it in GitHub Desktop.
Save maprangzth/7c1ca2537f0f1396a26c2ac8b5fb7fef to your computer and use it in GitHub Desktop.
Simple Playbooks for Install Apache Web Server
---
- name: Install Apache Web Server
hosts: web-server
remote_user: maprangzth
tasks:
- name: Ensure httpd package is latest
yum:
name: httpd
state: latest
notify: Start and enabled httpd service
become: True
handlers:
- name: Start and enabled httpd service
service:
name: httpd
state: started
enabled: True
become: True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment