install apache not from apache role
This commit is contained in:
parent
82ba012b73
commit
cb86aca658
44
inst-apache.yml
Normal file
44
inst-apache.yml
Normal 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
|
||||
5
main.yml
5
main.yml
@ -22,7 +22,6 @@
|
||||
import_role:
|
||||
name: role-netdata
|
||||
|
||||
- name: import apache role
|
||||
import_role:
|
||||
name: role-apache
|
||||
- include_tasks: inst-apache.yml
|
||||
|
||||
|
||||
@ -5,9 +5,6 @@
|
||||
- name: role-yum-check
|
||||
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
|
||||
src: git+https://gitweb.dyndns.org/awx/role_netdata.git
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user