[ansible-project] Jinga2 Integer substitution in YAML task file

2014-05-12 Thread Oliver Heinz
I have a group var definition: vm_disk_size: 10 In the tasks main file I have the option (action is vsphere_guest http://docs.ansible.com/vsphere_guest_module.html) size_gb: {{ vm_disk_size|int }} The Error I get is: msg: Config mismatch for vm_disk on [('size_gb', type 'int')]

Re: [ansible-project] Re: Intelligent loop for yum packages installation

2014-05-12 Thread Frederick Yankowski
We set up a local RHEL mirror just this week, thinking that that would speed up ansible. It didn't. Running yum: state=latest entails running repoquery numerous times for each package involved, based on snooping with ps. A typical such repoquery takes about two seconds on my managed

[ansible-project] Mixing sudo and dzdo

2014-05-12 Thread Joseph Pelizaro
Some of my infrastructure is controlled via Centrify and uses dzdo as sudo replacement, the rest just plain sudo. I can configure sudo_exe in ansible.cfg (works), but I cannot set this per server as I would need it. Any way to achieve this? Thanks, Joseph -- You received this message

Re: [ansible-project] Overriding value of 'hosts' playbook variable

2014-05-12 Thread Paul Durivage
I don't think what you want to do is override a value at runtime, but rather *create* a new group dynamically at runtime. Make a new group for hosts that meet some arbitrary criteria. See the group_byhttp://docs.ansible.com/group_by_module.htmlmodule -- I think you'll find what you're looking

Re: [ansible-project] Something Similar to Ruby's Case Operator

2014-05-12 Thread Michael DeHaan
There is no case statement in ansible. You can look into group_by when eliminating repeated conditionals if this works for you. - hosts: webservers tasks: - group_by: key=os-{{ ansible_os_family }} - hosts:webservers:os-Debian tasks: - ... etc On Sat, May 10, 2014 at 10:09

Re: [ansible-project] Re: Issue with git module and ssh agent forwarding

2014-05-12 Thread tamakisquare
Gilles, I have magically resolved the blocking issue by adding the option '-o UserKnownHostsFile=/dev/null', together with the option '-o StrictHostKeyChecking=no'. I tried this solution with both Ubuntu 12.04 and 14.04 and didn't get any issue at all. I, however, have yet to find the

[ansible-project] change permission

2014-05-12 Thread jose moya carballo
Hi everyone! I have got a new question, how can I change permission of directory and her contents? -- 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

Re: [ansible-project] change permission

2014-05-12 Thread Erik Anderson
On Mon, May 12, 2014 at 11:46 AM, jose moya carballo josemmc1...@gmail.com wrote: I have got a new question, how can I change permission of directory and her contents? The file module: http://docs.ansible.com/file_module.html Use the owner, group, mode, and likely recursive options. -Erik

Re: [ansible-project] Jinga2 Integer substitution in YAML task file

2014-05-12 Thread Michael DeHaan
This sounds much more like the module is unhappy with the input for the vsphere module. Please make sure there is a ticket on github.com/ansible/ansible and we can dig into this. The version of the vsphere library you are using may also be relevant. On Mon, May 12, 2014 at 8:10 AM, Oliver

Re: [ansible-project] Re: Intelligent loop for yum packages installation

2014-05-12 Thread Michael DeHaan
Ok, thanks for info. Probably something that should be addressed on yum's end as we do need the latest information to decide whether to run certain commands or not. While it is possible to just run the command and report back what it changed (or didn't), that's not Ansible's way when it can

Re: [ansible-project] Overriding value of 'hosts' playbook variable

2014-05-12 Thread Michael DeHaan
I'm confused by this as well. When you say you are not using an inventory file, do you mean you are using the dynamic inventory plugin? If you want a group that contains just the new hosts you have brought online, or want to add new hosts (in memory) to an existing host name, look at how the

Re: [ansible-project] Jinga2 Integer substitution in YAML task file

2014-05-12 Thread Oliver Heinz
If I give the same values without Jinga2 substitution everything works, fine? size_gb: 10 That's what let me assume that it is not a problem in the module itself. pysphere==0.1.8 Should I still file a bug? Am Montag, 12. Mai 2014 19:08:59 UTC+2 schrieb Michael DeHaan: This sounds much

[ansible-project] With the ufw module, enabling tcp for a port, also enables udp

2014-05-12 Thread David Reagan
See pastebin http://pastebin.com/MT3Y7WCJ for tasks and output. It's long. The section that concerns me is: Chain ufw-user-input (1 references) target prot opt source destination ACCEPT tcp -- anywhere anywhere tcp dpt:http ACCEPT

[ansible-project] Git clone no working after upgrade

2014-05-12 Thread James Goodhouse
Hey All, I just upgraded from 1.5.5 to 1.6.1 and am seeing the following error happen when trying to clone a repo: failed: [w4.website.net] = {failed: true, item: , parsed: false} invalid output was: Traceback (most recent call last): File stdin, line 1911, in module File stdin, line 503,

[ansible-project] synchronize module connects to local machine as root before calling rsync

2014-05-12 Thread 'Petros Moisiadis' via Ansible Project
I am trying to use the synchronize module and I notice that it first connects as root at the local machine before calling rsync. However, root user's ssh key is not set in the authorized keys of the remote host root user, so it prompts for password, which causes ansible-playbook to hang. I don' t

[ansible-project] Ansible RPM version

2014-05-12 Thread Tracy Phillips
I was just about to install Ansible using EPEL and it seems to be behind in release version, currently, it is at 1.5.5. Does Ansible (the company) maintain this RPM? I don't mind building 1.6 from the .spec file but since I have EPEL being pulled into Spacewalk, it would make it a lot easier to

Re: [ansible-project] Ansible RPM version

2014-05-12 Thread Tracy Phillips
Thanks Kevin, I will install it from testing and throw some karma your way. On Mon, May 12, 2014 at 3:22 PM, Kevin Fenzi ke...@scrye.com wrote: On Mon, 12 May 2014 15:17:04 -0400 Tracy Phillips tracp...@weberize.com wrote: I was just about to install Ansible using EPEL and it seems to be

Re: [ansible-project] access inventory file name

2014-05-12 Thread Mridusmita Talukdar
Hi, We have multiple clusters. Each of the clusters need to have a different var file (cluster specific variables) Currently the variable file name is same as the cluster name, so that when the extra-variable says cluster=ABC, my playbook picks up the variable file ABC.yml which I refer to in

[ansible-project] UnicodeEncodeError: 'ascii' codec can't encode character u'\xa0' in position 84: ordinal not in range(128)

2014-05-12 Thread Joel Sdc
Hi, I'm having a little problem. When I run a simple playbook, on some servers I get a UnicodeEncodeError and the playbook is not executed. I have the role users_admin, it creates 3 groups, makes sure that 4 users exist and have a specific password and set a root password if it has changed.

[ansible-project] Ansible upgrade testing - version number isn't tracking?

2014-05-12 Thread Ryan Mitchell
Hi all - I'm testing out upgrading to a later version of Ansible and how my playbooks would need to be modified prior to actually doing the upgrade. In order to test this out, I'm doing the following: * Deleting /usr/bin/ansible* (yes - I had done the install of ansible up until now - due to

[ansible-project] Re: Ansible upgrade testing - version number isn't tracking?

2014-05-12 Thread Ryan Mitchell
... and as is usual for me, I dug deeper and realized that there were some packages installed in /usr/lib/python2.6/site-packages. So I ran easy_install pip, then ran sudo pip uninstall ansible until it gave me an error that nothing was left to uninstall (took about 9 runs to get all the

Re: [ansible-project] UnicodeEncodeError: 'ascii' codec can't encode character u'\xa0' in position 84: ordinal not in range(128)

2014-05-12 Thread James Cammarata
Can you try setting module_lang = en_US.UTF-8 in your ansible.cfg to see if that corrects the issue? On Mon, May 12, 2014 at 2:30 PM, Joel Sdc sdc.j...@gmail.com wrote: Hi, I'm having a little problem. When I run a simple playbook, on some servers I get a UnicodeEncodeError and the playbook

[ansible-project] Re: variable names of variables holding environment variables :)

2014-05-12 Thread Dmitry Makovey
after tinkering with above idea I've got things working exactly how I wanted. Thanks for the tip! -- 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

Re: [ansible-project] freebsd buildworld/buildkernel crashes host OS ??

2014-05-12 Thread Dmitry Makovey
For posterity: I've tracked down the issue - it was FreeBSD's UFS Journaling that was crashing things. Looks like ansible was able to thrash system well enough to expose issues with that FS feature. After disabling it - things seems to be running as expected. -- You received this message

Re: [ansible-project] Re: Intelligent loop for yum packages installation

2014-05-12 Thread Dmitry Makovey
I realize that this will probably qualify for non-Ansible way, but here's how I had to resolve similar issue: 1. split playbook into install and setup whereas install is ran only once in a while if you need to change list of packages installed etc. - resolves issues with RHN etc. setup can be