I want to have a way to globally define OS dependent variables. I currently am doing this with something like this at the top of my playbooks
`
- name: Gather facts
hosts: the_hosts_we_are_applying_playbook_on
tags: always
tasks: - group_by:
key: os_family_{{ ansible_os_family | lower }}
`
and define stuff in group_vars/os_family_redhat.yml etc.
I would like to have this globally so that I haven’t have to define this in every playbook. Is there a way to have a playbook run every time before the one defined on command line? I’m thinking of something like
ansible.cfg: [default] before_playbook = setup.yml
Could this be done with a plugin that is called after ‘setup’ has been called?