Files
startusingansible/training/reiniciar-nginx.yml
Guillem Hernandez Sola 5620e1f4dc Training from 20250617
2025-06-17 13:51:26 +02:00

15 lines
383 B
YAML

- name: Reiniciar Nginx
hosts: all
become: yes
tasks:
- name: Reiniciar el servicio Nginx
service:
name: nginx
state: restarted
- name: Verificar el estado del servicio Nginx
service_facts:
- name: Mostrar estado del servicio Nginx
debug:
msg: "El servicio Nginx está {{ ansible_facts.services['nginx.service'].state }}"