Created
November 27, 2017 20:17
-
-
Save kguay/14676da2b66197a404f16e3bc90bb186 to your computer and use it in GitHub Desktop.
Ansible playbook to get os distro and version for all hosts. Works on Fedora/CentOS/RedHat machines.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Print linux distribution and version | |
hosts: all | |
tasks: | |
- name: capture output of id command | |
command: cat /etc/system-release | |
register: login | |
- debug: msg="{{ login.stdout }}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
how use for multi version os?