install apache not from apache role

This commit is contained in:
Gilles Mouchet 2024-06-23 07:39:43 +02:00
parent 82ba012b73
commit cb86aca658
3 changed files with 46 additions and 6 deletions

44
inst-apache.yml Normal file
View File

@ -0,0 +1,44 @@
---
- name: install apache
yum:
state: installed
name:
- httpd
- mod_ssl
- name: start and enable the httpd service
service:
state: started
name: httpd
enabled: true
- name: open http port
firewalld:
service: http
permanent: true
immediate: true
state: enabled
- name: open https port
firewalld:
service: https
permanent: true
immediate: true
state: enabled
- name: create cert path
file:
path: /etc/httpd/certs
state: directory
- name: delete welcome.conf
file:
path: /etc/httpd/conf.d/welcome.conf
state: absent
- name: modify config to not navigate on os from browser (You don't have permission to access / on this server.)
lineinfile:
path: /etc/httpd/conf/httpd.conf
regexp: 'Options Indexes FollowSymLinks'
line: '#Options Indexes FollowSymLinks'
notify: restart httpd

View File

@ -22,7 +22,6 @@
import_role: import_role:
name: role-netdata name: role-netdata
- name: import apache role - include_tasks: inst-apache.yml
import_role:
name: role-apache

View File

@ -5,9 +5,6 @@
- name: role-yum-check - name: role-yum-check
src: git+https://gitweb.dyndns.org/scripts/yum-check.git src: git+https://gitweb.dyndns.org/scripts/yum-check.git
- name: role-apache
src: git+https://gitweb.dyndns.org/awx/role-apache.git
- name: role-netdata - name: role-netdata
src: git+https://gitweb.dyndns.org/awx/role_netdata.git src: git+https://gitweb.dyndns.org/awx/role_netdata.git