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

View File

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