Created
October 21, 2017 08:56
-
-
Save PKOfficial/8981afc022a6c1f9988658b1ee8b52c8 to your computer and use it in GitHub Desktop.
This file contains 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
--- | |
- hosts: webservers | |
vars: | |
http_port: 80 | |
max_clients: 200 | |
remote_user: root | |
tasks: | |
- name: ensure apache is at the latest version | |
yum: name=httpd state=latest | |
- name: write the apache config file | |
template: src=/srv/httpd.j2 dest=/etc/httpd.conf | |
notify: | |
- restart apache | |
- name: ensure apache is running (and enable it at boot) | |
service: name=httpd state=started enabled=yes | |
handlers: | |
- name: restart apache | |
service: name=httpd state=restarted |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment