srv-stage/u-apache.yml
2025-01-19 20:23:14 +01:00

34 lines
614 B
YAML

---
- name: stop and disable the httpd service
systemd_service:
state: stopped
name: httpd
enabled: false
ignore_errors: yes
- name: uninstall apache
yum:
name:
- httpd
state: removed
- name: delete apache config
file:
dest: /etc/httpd
state: absent
- name: delete root apache directory
file:
path: "{{ item }}"
state: absent
with_items:
- /var/www
- /home/www
- name: disable http port
firewalld:
systemd_service: http
permanent: true
immediate: true
state: disabled