Update os/os-release.yml
This commit is contained in:
parent
bc3bcbc7b2
commit
38d148339d
|
@ -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 }}"
|
||||||
|
|
Loading…
Reference in New Issue