--- - name: Obtener la versión del sistema operativo hosts: "{{ host }}" 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 }}" msg: "OS is {{ ansible_distribution }} version {{ ansible_distribution_version }} codename {{ ansible_lsb ['codename'] }}"