Hello
Let me start with the use case. I have to retrieve the filename pointed by a symlink, say /etc/current → /etc/version-1.0 and determine if this filename is the same across a bunch of nodes.
I figure I have to do two things:
- Use file module, and get the filename, and use set_fact to set “version_number” fact on each node.
- Loop through the facts for each node, and keep appending a set (using union with the “version_number” fact
- If the final set is greater than 1 there is a mistmach in version, if not I can display that version_number.
This is how I attempted to do it :
`