Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How this script to get the system info and choose the right system yml file. #17

Open
BrunoJu opened this issue Jan 12, 2017 · 2 comments

Comments

@BrunoJu
Copy link

BrunoJu commented Jan 12, 2017

tasks/main.yml:

  • name: Add the OS specific varibles
    include_vars: "{{ ansible_os_family }}.yml"

How to get system_family_version????
I have no idea.

@global
Copy link

global commented Jan 13, 2017

ansible_os_family is a variable defined via facts. If you run in your host:

ansible localhost -m setup -k -i inventory

you would see all variables available to be used. Your inventory file should have localhost string on it. For my Ubuntu box it sets up to

"ansible_os_family": "Debian"

So it will include Debian.yml

@BrunoJu
Copy link
Author

BrunoJu commented Jan 16, 2017

Yeah, I got. THX global :-D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants