Nusenu
unread,Feb 20, 2015, 5:16:37 PM2/20/15Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ansible...@googlegroups.com
Hi,
I'm having the problem that group_vars do not seem to be visible in the
role. I assumed it should be.
working:
-------------
tasks:
- name: create groups based on pkg
group_by: key={{ansible_pkg_mgr}}
# this one is defined in a group_var
- debug: var=user1
-------------
not working:
-------------
tasks:
- name: create groups based on package manager
group_by: key="{{ansible_pkg_mgr}}"
roles:
- role1
-------------
role1 uses a variable 'user1' that is defined in group_vars/*, but when
running the playbook I get "undefined variables.." in places where a
task tries to access user1.
Is this expected?
thanks,
Nusenu