rajout role a modifier
This commit is contained in:
57
tconstans.apache_formation/tasks/apache.yml
Normal file
57
tconstans.apache_formation/tasks/apache.yml
Normal file
@@ -0,0 +1,57 @@
|
||||
---
|
||||
- name: installation
|
||||
package:
|
||||
name: httpd
|
||||
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: httpd
|
||||
enabled: yes
|
||||
|
||||
- name: open firewall port
|
||||
firewalld:
|
||||
service: http
|
||||
permanent: yes
|
||||
immediate: yes
|
||||
state: enabled
|
||||
ignore_errors: yes
|
||||
|
||||
- name: create documentroot
|
||||
file:
|
||||
name: "/var/www/opendoor.fr"
|
||||
state: directory
|
||||
|
||||
- name: create index file
|
||||
template:
|
||||
src: index.html
|
||||
dest: "/var/www/opendoor.fr/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: httpd
|
||||
state: started
|
||||
3
tconstans.apache_formation/tasks/main.yml
Normal file
3
tconstans.apache_formation/tasks/main.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
---
|
||||
- import_tasks: apache.yml
|
||||
tags: httpd
|
||||
Reference in New Issue
Block a user