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 }}" - name: Obtener la versión del sistema operativo
gather_facts: True hosts: "{{ host }}"
tasks: gather_facts: yes
- name: Check Dist Version
shell: cat /etc/os-release
register: response
- 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 }}"