Update os/os-release.yml

This commit is contained in:
David Lopez 2023-07-26 19:44:34 +00:00
parent bc3bcbc7b2
commit 38d148339d
1 changed files with 13 additions and 7 deletions

View File

@ -1,9 +1,15 @@
---
- hosts: "{{ host }}"
gather_facts: True
tasks:
- name: Check Dist Version
shell: cat /etc/os-release
register: response
- name: Obtener la versión del sistema operativo
hosts: "{{ host }}"
gather_facts: yes
- debug: msg="{{ response.stdout }}"
tasks:
- name: Mostrar la versión de Debian
when: ansible_distribution == 'Debian'
debug:
msg: "La versión de Ubuntu en {{ inventory_hostname }} es {{ ansible_distribution_version }}"
- name: Mostrar la versión de CentOS
when: ansible_distribution == 'CentOS'
debug:
msg: "La versión de CentOS en {{ inventory_hostname }} es {{ ansible_distribution_version }}"