initial commit

This commit is contained in:
2020-09-22 15:42:05 +02:00
commit fa38c349be
13 changed files with 205 additions and 0 deletions

View File

@@ -0,0 +1,57 @@
---
- name: installation
package:
name: "{{ apache_package_name }}"
state: present
- name: configuration
notify: reload httpd
template:
src: vhost.conf
dest: /etc/httpd/conf.d/vhost.conf
mode: 0640
owner: root
group: apache
- name: enable service
service:
name: "{{ apache_service_name }}"
enabled: yes
- name: open firewall port
firewalld:
service: http
permanent: yes
immediate: yes
state: enabled
ignore_errors: yes
- name: create documentroot
file:
name: "{{ apache_documentroot }}"
state: directory
- name: create index file
template:
src: index.html
dest: "{{ apache_documentroot }}/index.html"
mode: 0644
- name: install python passlib package
package:
name: python-passlib
state: present
- name: passwd file
htpasswd:
path: "/etc/httpd/passwd"
name: tom
password: "123Soleil"
mode: 0640
owner: root
group: "apache"
- name: start service
service:
name: "{{ apache_service_name }}"
state: restarted

View File

@@ -0,0 +1,3 @@
---
- import_tasks: apache.yml
tags: httpd