2
0

rajout handler

This commit is contained in:
2020-05-05 22:52:52 +02:00
parent a7798332ab
commit 8e795638ab

View File

@@ -1,13 +1,17 @@
---
- name: install apache via ansible playbook
hosts: test
become: true
user: ansible
hosts: all
handlers:
- name: restart apache
service:
name: httpd
state: restarted
tasks:
- name: install apache
yum:
name: httpd
state: latest
state: present
- name: conf httpd
template:
@@ -16,15 +20,15 @@
mode: 0640
owner: root
group: apache
notify: restart apache
- name: activate apache
service:
name: httpd
enabled: yes
state: restarted
state: started
- name: open firewall port
tags: dev
firewalld:
service: http
permanent: yes