vn-ansible/os/os-release.yml

13 lines
565 B
YAML

---
- name: Obtener la versión del sistema operativo
hosts: "{{ hosts_servers }}"
gather_facts: yes
tasks:
- name: Mostrar la versión de Debian
debug:
#msg: "El sistema operativo en {{ inventory_hostname }} es {{ ansible_distribution }} {{ ansible_distribution_version }}"
# msg: "El pretty name de {{ ansible_distribution }} {{ ansible_distribution_version }} es {{ ansible_lsb }}" {{ ansible_lsb ['codename'] }}"
msg: "OS is {{ ansible_distribution }} V. {{ ansible_distribution_version }} , {{ ansible_lsb.codename }}"