uploaded playbook
This commit is contained in:
21
playbooks/simple_playbook.yml
Normal file
21
playbooks/simple_playbook.yml
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
---
|
||||||
|
- hosts: labservers
|
||||||
|
become: yes
|
||||||
|
tasks:
|
||||||
|
- name: install apache
|
||||||
|
yum:
|
||||||
|
name: httpd
|
||||||
|
state: latest
|
||||||
|
- name: start and enable httpd
|
||||||
|
service:
|
||||||
|
name: httpd
|
||||||
|
state: started
|
||||||
|
enabled: yes
|
||||||
|
- name: create index.html
|
||||||
|
file:
|
||||||
|
path: /var/www/html/index.html
|
||||||
|
state: touch
|
||||||
|
- name: add a linex to index.html
|
||||||
|
lineinfile:
|
||||||
|
path: /var/www/html/index.html
|
||||||
|
line: "Hello World"
|
||||||
Reference in New Issue
Block a user