Nueva estructura nginx

This commit is contained in:
Guillem Hernandez Sola
2025-06-18 11:02:51 +02:00
parent afbfbf8629
commit 6353bba4d7
3 changed files with 89 additions and 0 deletions

View File

@@ -1,3 +1,9 @@
#SPDX-License-Identifier: MIT-0
---
# handlers file for nginx
- name: Reiniciar Nginx
ansible.builtin.service:
name: nginx #Nombre del servicio a reiniciar
state: restarted #Reinicia el servicio
when: ansible_facts.services['nginx.service'].state == 'running' #Solo si el servicio está corriendo
#when: ansible_facts.services['nginx'].state == 'running' #Condición para versiones antiguas