Files
courses/ansible-course/playbooks/service.yaml
T
2025-05-20 11:57:43 -04:00

16 lines
282 B
YAML

- hosts: web
remote_user: root
become: yes
tasks:
- name: Install Apache
yum:
name: httpd
state: installed
- name: Restart Apache
service:
name: httpd
state: restarted
- name: Remove Apache
yum:
name: httpd
state: removed