Tag Info

Hot answers tagged


If I understand correctly you need to access some ansible variables defined for a generic host. You can access all hosts variables by the dictionary hostvars, that has hostname as primary key, for your example: {{ hostvars['foo']['ipv4']['address'] }} Credits goes to: ...


The latest best practice is not to embed the user config file under a hidden user directory unless there will be more than one user specific file for the application. Thus, you should use only ~/.fooconfig (or ~/.foorc) for the user resource file for foo. If foo has multiple user files, then it's ~/.foo/config for the configuration file along with any ...

Only top voted, non community-wiki answers of a minimum length are eligible