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