ntp icon indicating copy to clipboard operation
ntp copied to clipboard

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

Open BrunoJu opened this issue 8 years ago • 2 comments

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.

BrunoJu avatar Jan 12 '17 08:01 BrunoJu

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

global avatar Jan 13 '17 11:01 global

Yeah, I got. THX global :-D

BrunoJu avatar Jan 16 '17 10:01 BrunoJu