Files
EX407-Ansible-Automation/playbooks/simple_playbook.yml
Ilgar_Naghiyev fb5720121c uploaded playbook
2020-03-02 17:20:32 +01:00

21 lines
465 B
YAML

---
- 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"