I'm simply trying to check the version of ubuntu on all my servers. Based on this question I see that ansible has a ansible_distribution_version
but this playbook does not show how I would simply just have it print out the ubuntu version, ie ubuntu 14.04, 16.04, etc
Ansible playbook to determine OS release
ansible
Best Answer
You can do one at the time
See the results:
Or you can use a more advance configuration iterating facts:
And a more compact results:
In both cases is a good practices to get the info using facts instead of
shell
orcommand
modules.