For anyone that sees this, I don't recommend it. There are synchronicity
issues with installing redhat-lsb-core (for example) and actually accessing
ansible_lsb. Unless your node ALREADY has lsb installed BEFORE you run the
playbook you'll be risking the ansible_lsb throwing an undifined error. It
doesn't matter whether you check if the binary is now on the node, or even
if you use a wait_for or time command. It'll fail the playbook and only be
available when you RErun the playbook.
On Friday, July 19, 2013 at 1:25:44 PM UTC-7, Stephen Fromm wrote:
>
> An alternative is to install lsb utility (redhat-lsb on redhat-ish
> distros) and use {{ ansible_lsb.major_release }}. ansible_lsb looks like:
>
> "ansible_lsb": {
> "codename": "Santiago",
> "description": "Red Hat Enterprise Linux Server release 6.4
> (Santiago)",
> "id": "RedHatEnterpriseServer",
> "major_release": "6",
> "release": "6.4"
> },
>
> sf
>
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/63e35b62-dc62-4a33-99c5-ec1580969a11%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.