This commit is contained in:
2025-09-23 10:20:19 +02:00
parent f5669f671d
commit df32926ad2

View File

@@ -9,12 +9,12 @@
tasks:
- name: install apache
yum:
ansible.builtin.package:
name: httpd
state: latest
- name: conf httpd
template:
ansible.builtin.template:
src: vhost.conf
dest: /etc/httpd/conf.d/vhost.conf
mode: 0640
@@ -26,13 +26,13 @@
ansible.builtin.meta: flush_handlers
- name: activate apache
service:
ansible.builtin.service:
name: httpd
enabled: yes
state: started
- name: open firewall port
firewalld:
ansible.posix.firewalld:
service: http
permanent: yes
immediate: yes
@@ -40,12 +40,12 @@
ignore_errors: yes
- name: create documentroot
file:
ansible.builtin.file:
name: /var/www/html/example.org
state: directory
- name: create index file
copy:
ansible.builtin.copy:
src: index.txt
dest: /var/www/html/example.org/index.html
mode: 0644