On Fri, Jan 30, 2015 at 5:01 PM, Stefan G. Weichinger <li...@xunil.at> wrote:
> On 29.01.2015 11:31, hydra wrote: > > I haven't migrated to group_vars yet, so try and let us know ;) > > It took me a bit of fiddling but I think I figured it out. > > I had to get the directory structure correct ... now I have > > /etc/ansible/inventories/group_vars/ > > with files like siteA, siteB, siteC ... containing the specific variables. > > At first I always had /etc/ansible/group_vars ... and that didn't work > at all! > > Now I am able to have such a small playbook for the whole dhcp-config of > one site: > > --- > - hosts: siteA > user: root > roles: > - dhcpd > > and this pulls the group_vars from > > /etc/ansible/inventories/group_vars/siteA > > and applies it to the dhcpd-role > and overrides /etc/ansible/roles/dhcpd/defaults/main.yml ... which was > my original goal! > > nice! > > Stefan > > > By the way, you don't need to have it in /etc/ansible, feel free to have it anywhere.