[ansible-project] Iterating over a list in a dictionary within a Jinja2 template

2015-12-08 Thread cmacrae
Hi guys, I've got something I'd really like some help on, not just the solution, but the understanding and perhaps any related documentation/articles. I'm writing a role for deployment of Hubot. To define bots to be deployed, I'm using a dictionary, like so: hubot_bots: testbot: owner:

[ansible-project] Re: yum module fails to install multiple packages

2015-12-08 Thread Александр Костырев
Strangely enough but after rewriting - name: install plugins yum: name='ruby193-rubygem-{{ item }}' state=present into - name: install plugins OS agnostic action: > {{ ansible_pkg_mgr }} name="{{ foreman_plugin_prefix }}{{ item }}" it works! so my problem solved On Monday,

[ansible-project] handlers not being played

2015-12-08 Thread Johan Söderberg
Hi, I have a problem where handlers not being played. I've narrowed it down to the following situation: test.yml: --- - hosts: test roles: - role: common when: commonrole_has_run is not defined roles/common/tasks/main.yml --- - name: Debug common role shell: date notify: -

Re: [ansible-project] handlers not being played

2015-12-08 Thread Johan Söderberg
I'm running 1.9.4 installed from the fedora epel repo. /Johan -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com.

[ansible-project] Re: Iterating over a list in a dictionary within a Jinja2 template

2015-12-08 Thread Mike Biancaniello
First, in your j2, you can't ever reference `item` without `item.key` or `item.value`. However, I think your amin problem is that your first iteration is a dict (not a list) and the second is a list of dicts without deterministic keys. Try this: hubot_bots: testbot: owner: 'Bot Wrangler

[ansible-project] Re: [ansible-devel] Re: Ansible 2.0 RC2 is available for testing!

2015-12-08 Thread James Cammarata
Hi Jeff, we're going to let the tags issue slide until a dot release, due to the complexity involved in trying to determine tags from include files. Since includes are now dynamic and can be based on inventory variables (or even variables set during the execution of a playbook), we have no way of

Re: [ansible-project] handlers not being played

2015-12-08 Thread James Cammarata
Hi Johan, with which version of Ansible are you seeing this? James Cammarata Director, Ansible Core Engineering github: jimi-c On Tue, Dec 8, 2015 at 9:42 AM, Johan Söderberg wrote: > Hi, > > I have a problem where handlers not being played. I've narrowed it down to > the

[ansible-project] ec2_group failed to template

2015-12-08 Thread Edgardo Vega
I am having a strange issue I have a role that looks like the following # roles/ec2_sg/tasks/main - name: Create Security Group ec2_group: profile: "{{ profile }}" name: "{{ type }}" description: "ports required to communicate to {{ type }}" vpc_id: "{{ aws_vpc_id }}"

[ansible-project] Reporting on dry run package updates

2015-12-08 Thread Dan Rough
Hi, On a weekly basis I upgrade any packages for which there are available updates on our servers. I first perform this in our test environment, and then once happy with those changes, in our production environment. Though it's not a massive task, I have started to look at how I could do this

[ansible-project] Using loops with sub-elements/parameters ansible, particularly ec2 module

2015-12-08 Thread Dinil
Hi, Am trying to use Loop for 'Volumes' parameter of ec2 - ec2: prop1: prop2: volumes: - device_name : {{ item.key1 }} - volume_size: {{ item.key2 }} with_items: {{ var}} var: { 'key1' : 'value1' , 'key2' : 'value2'} { 'key1' : 'value3' , 'key2' : 'value4'} I

[ansible-project] variables messed up when using including tasks

2015-12-08 Thread silverdr
Hello, group, I encountered a strange problem with variables when running a role. The role has some defaults and the variables are used throughout the plays. At some point in the tasks/mains playbook, there are included other tasks from the same directory. Those also include tasks from root

[ansible-project] Re: variables messed up when using including tasks

2015-12-08 Thread silverdr
Actually the problem shows up even when the included tasks do not include any other ones. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to

[ansible-project] The ansible -t option for ansible-playbook

2015-12-08 Thread Rick Romanus
I'm trying to gather file stats of the sudoers file from a list of hosts and put the the stats in individual files on the local machine. I found doing this with the ansible command is fairly easy... ansible all -i hosts -u root -k -m stat -a "path=/etc/sudoers" -t /home/rromanu/LOG/FileInfo

Re: [ansible-project] The ansible -t option for ansible-playbook

2015-12-08 Thread Brian Coca
you can use in 2.0 if you just whitelist the 'tree' callback, though you cannot configure the output dir. ansible.cfg: callback_whitelist = tree -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from

[ansible-project] which branch should i submit pull request if I want to a bug fixed in 1.9.x

2015-12-08 Thread Leon Xie
Hi all, I found a bug on ansible 1.9.2 and have finished coding. If I want this bug to be fixed in later 1.9.x release, which branch should I submit my pull request? Should I submit to stable-1.9 branch or devel branch? Best, Leon -- You received this message because you are subscribed to the

Re: [ansible-project] Using loops with sub-elements/parameters ansible, particularly ec2 module

2015-12-08 Thread Brian Coca
The loop is for the whole task, that is why you get multiple instances. What you want is to pass the datastucture to the volumes key, jinja filters should help you with this. On Dec 8, 2015 1:24 PM, "Dinil" wrote: > Hi, >Am trying to use Loop for 'Volumes' parameter of

Re: [ansible-project] variables messed up when using including tasks

2015-12-08 Thread silverdr
> On 2015-12-09, at 00:10, Brian Coca wrote: > > I'm not understanding the problem, can you post an acual example and also > what versions you are using? There are several roles with practically the same structures: - role0 - defaults - main.yml - tasks -

Re: [ansible-project] empty ansible_domain from setup

2015-12-08 Thread markham breitbach
SOLVED! Also found this post helpful: https://groups.google.com/forum/#!msg/ansible-project/z27N4scKS-I/UfWyVk8Mug8J It was an ordering issue within the /etc/hosts file. I have some local aliasing setup as an artifact of legacy systems, and socket.getfqdn resolves these in order, where

[ansible-project] Frozen process when you run "dpkg-reconfigure"

2015-12-08 Thread Ivan Nunes
The process stand by and simply does not end the execution of the playbook. It will be a failure ansible or failure is a parameter of dpkg command? UIDPID PPID C STIME TTY TIME CMD > ansible 6249 6168 0 20:21 pts/000:00:00 /bin/sh -c sudo -k && sudo > -H -S -p "[sudo

Re: [ansible-project] Re: variables messed up when using including tasks

2015-12-08 Thread Brian Coca
I'm not understanding the problem, can you post an acual example and also what versions you are using? -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to