[ansible-project] Seeing if any of the group names for a host has a corresponding directory, and using that as a templated path component?

2017-02-27 Thread JK Laiho
We've got a set of playbooks that we use to set up production, testing and development environments for a project. A very useful pattern on which we rely heavily is using template source directory names based on inventory_hostname, e.g: - name: copy over nginx config for some site template:

[ansible-project] IndexError in plugins/lookup/subelements.py after upgrade from 1.9 to 2.0

2016-03-24 Thread JK Laiho
Upgrading from 1.9.5 to 2.0.1.0 without changing the playbook, a task fails that used to work. The error: [DEPRECATION WARNING]: Skipping task due to undefined Error, in the future this will be a fatal error.. This feature will be removed in a future release. Deprecation warnings can be

[ansible-project] Sudo tty/askpass related error with pipelining after upgrade from 1.9 to 2.0

2016-03-24 Thread JK Laiho
A playbook that runs fine on Ansible 1.9.5 suddenly fails on 2.0 with the following error (sensitive details hidden): $ *ansible-playbook deploy.yml -i inventory_dev.py -* Using /Users/[...]/ansible.cfg as config file SUDO password: Loaded callback default of type stdout, v2.0 3 plays in

Re: [ansible-project] Collecting files across all the roles a host belongs to

2015-02-10 Thread JK Laiho
Hi James, Thanks for your help! You put me on the right track. Here's what I ended up doing (in case someone else finds this useful). First, for DRY's sake, I collected the absolute paths to the apt keys in group_vars/all to make them global and role-independent, in a form that could be

[ansible-project] Collecting files across all the roles a host belongs to

2015-02-09 Thread JK Laiho
I'm new to Ansible, and trying to wrap my head around the variety of ways to organize playbooks and achieve certain tasks in a DRY way, without duplicating too much logic in several places. Right now I'm trying to find a way in which I could have with_fileglob consolidate files of a certain