solution apache

This commit is contained in:
2021-11-30 10:51:49 +01:00
parent 7c7e0658fc
commit b6e736e264
12 changed files with 198 additions and 0 deletions

39
tco.apache/tasks/main.yml Normal file
View File

@@ -0,0 +1,39 @@
---
- name: install apache
yum:
name: httpd
state: latest
- name: conf httpd
template:
src: vhost.conf
dest: /etc/httpd/conf.d/vhost.conf
mode: 0640
owner: root
group: apache
notify: restart apache
- name: activate apache
service:
name: httpd
enabled: yes
state: started
- name: open firewall port
firewalld:
service: http
permanent: yes
immediate: yes
state: enabled
ignore_errors: yes
- name: create documentroot
file:
name: /var/www/html/orsys.fr
state: directory
- name: create index file
copy:
src: index.html
dest: /var/www/html/orsys.fr/index.html
mode: 0644 tasks file for tco.apache