[ansible-project] Re: vsphere_client: vm_extra_config ignored with template

2016-02-02 Thread John Grinwis
Hmm, looks like vsphere_guest.py is only checking folder info from vm_extra_config when cloning a template: try: if not vmTarget: cloneArgs = dict(resourcepool=rpmor, power_on=power_on_after_clone) if snapshot_to_clone is not None: #check if snapshot_to_clone is specified, Create a Linked Clone

Re: [ansible-project] YUM module Install loop too clever

2016-02-02 Thread Toshio Kuratomi
On Mon, Feb 1, 2016 at 10:55 AM, Brian Coca wrote: > in 2.0 you can set ANSIBLE_SQUASH_ACTIONS env var or squash_actions in > ansible.cfg to not include the yum module (default is "apt, dnf, > package, pkgng, yum, zypper"). Just note that now you'll be running 1 > task per item

[ansible-project] vsphere_client: vm_extra_config ignored with template

2016-02-02 Thread John Grinwis
Hi, we're doing some test with deploying a Juniper vSRX on our VMware environment using Ansible 2.1.0 This vSRX can configure itself if you add machine.id with some parameters to the .vmx file. But if we try to use the following vm_extra_config: in our playbook: vm_extra_config:

Re: [ansible-project] Display "shell" or "command" STDOUT/STDERR in real time as they execute

2016-02-02 Thread Brian Coca
that is what im experementing on adding in this branch https://github.com/bcoca/ansible/tree/update_json On Tue, Feb 2, 2016 at 12:25 PM, johhue wrote: > Hello, > > I have seen previous posts on this topic but wanted to ask again hoping this > is something we are considering

Re: [ansible-project] host_vars with .yml

2016-02-02 Thread Brian Coca
no, this is the matching order precedence "", ".yml", ".yaml", ".json", so local will be picked up if it exists in preference over local.yml -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group

[ansible-project] Need help with nested variables to use in a "when:" directive inside of a role playbook

2016-02-02 Thread Dayton Jones
I have a requirement to create directories only if the specified user(s) exist on the remote host... given my role defintion below, what is the proper syntax to use with "when" (or other method) to only create the directory only if that user exists on the host and skip the task if not present?

[ansible-project] winrm

2016-02-02 Thread Nikhil Shah
*Nshah* Feb 2, 12:42 Hello, I followed the guidelines in setting up a windows node. http://docs.ansible.com/ansible/intro_windows.html#windows-system-prep I am using Windows 2008 R2, which had PowerShell 2.0 installed; I upgraded to PowerShell 4.0 (since the requirements said PowerShell

[ansible-project] local_action fails to find module in Ansible 2.0 (delegate_to works)

2016-02-02 Thread bryan . yu
Upgraded to ansible 2.0.0.2 from 1.9.4 and noticed that after creating a new ec2 instance the wait_for module failed when using local_action: Here's my play and the output: - name: Wait for SSH to come up *local_action:* module: wait_for host={{

Re: [ansible-project] local_action fails to find module in Ansible 2.0 (delegate_to works)

2016-02-02 Thread Brian Coca
You are mixing formats, use yaml or key=val, but not both. -- 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. To

[ansible-project] Re: winrm

2016-02-02 Thread Nikhil Shah
maybe this might be a bit more insight: ansible windows -m win_ping - <10.40.1.31> ESTABLISH WINRM CONNECTION FOR USER: *root* on PORT 5986 TO XXX <10.40.1.31> WINRM CONNECT: transport=plaintext endpoint=https://X:5986/wsman <10.40.1.31> WINRM CONNECTION ERROR: 500

[ansible-project] How do I get the Ansible plugin to work with Jenkins?

2016-02-02 Thread Kiran
My Ansible (version 1.9.5) server is on its own dedicated CentOS 7 server. My Jenkins (version 1.6) server is on its own dedicated CentOS 7 server. I installed the Ansible plugin for Jenkins. I created a New Item that invokes an ad-hoc Ansible command. For the Ansible Installation field, I

Re: [ansible-project] unarchive always unzips

2016-02-02 Thread Toshio Kuratomi
On Feb 2, 2016 3:42 AM, "Tuomas-Matti Soikkeli" wrote: > > So the final question is do we choose convenience over control? Just check file sizes from headers and don't extract if matches. Is this reasonable or unacceptable? Just those two would be too big a change. We'd

[ansible-project] Re: Evaluate variable immediately, save for later

2016-02-02 Thread Colin Byrne
Thanks! For some reason I was stuck on using exclusively handlers or registered variables. Using them in combination is definitely the way to go. -C On Monday, February 1, 2016 at 7:04:25 PM UTC-8, Colin Byrne wrote: > > Hey, so I have the following sequence where I first register a variable, >

[ansible-project] Ansible dynamic inventory pegs CPU and RAM reading in a 54K JSON object

2016-02-02 Thread Aleksey Tsalolikhin
Hi, I'm trying to feed Ansible 2.0.0.2 dynamic inventory from an Enterprise CMDB system. The Enterprise CM system already has lots of groups defined, I want to be able reference them through Ansible, so I'm trying to load the Enterprise CM data into Ansible. The JSON object from the CM

[ansible-project] ec2_vpc_route_table module

2016-02-02 Thread Christian Del Pino
Hello there. Currently using ansible 2.0.0.2-1ppa~vivid on ubuntu and I am having issues using one of the aws modules. Getting the following when trying to use the ec2_vpc_route_table module: *'ERROR: ec2_vpc_route_table is not a legal parameter in an Ansible task or handler'*. does this mean

[ansible-project] SSH Issue with HP switch Comware 7

2016-02-02 Thread Денис Авзалов
Hi! I am trying to establish SSH connection to HP switch and process simple commands on it. Unfortunately, couple days of working on this task was not successful. I am working on Mac, ansible version 2.0. Command that I am trying to execute: *sudo ansible TEMP -m raw -a "dis stp root"

[ansible-project] Ansible fails to pass a simple shell command to an AIX server : error message "SyntaxError: invalid syntax\r\n", "msg": "MODULE FAILURE"

2016-02-02 Thread Nicolette Kis
Hello there, I have the following error message when I run a simple playbook with ("ls -l" shell a command). Could help me to find out what is wrong here ? Below is the debug error message : TASK [setup] *** <192.168.14.224>

[ansible-project] Re: Ansible 2.0 installation on Ubuntu

2016-02-02 Thread Yoel
Solved. The cause: Ansible was also installed with pip. I removed from pip and all is ok. Le jeudi 28 janvier 2016 15:48:12 UTC+1, Yoel a écrit : > > Hi, > > I'm trying to install ansible 2.0 on an Ubuntu Ubuntu 14.04.3 LTS (trusty) > . > > I'm a little confused > I followed the installation

Re: [ansible-project] with_inventory_hostname error

2016-02-02 Thread Brian Coca
made fix to docs, which were wrong. -- Brian Coca -- 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. To post to

[ansible-project] Unarchive

2016-02-02 Thread Graham Hay
I'm using the unarchive module for deployment. I'd like to take advantage of the diff feature to avoid uploading the tarball, if nothing has changed; but I'm wary of leaving remnants of the previous version (a lesson I've learned the hard way), so I currently delete it before unarchiving the

Re: [ansible-project] Access facts in custom filter plugin

2016-02-02 Thread Brian Coca
filter plugins don't have access to anything except the arguments passed directly: arg1 | filter(arg2, arg3, ...) -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails

Re: [ansible-project] with_inventory_hostname error

2016-02-02 Thread Brian Coca
missing an 's', with_inventory_hostnames -- Brian Coca -- 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. To

Re: [ansible-project] Delegate_to fails if host is referenced by non-inventory name

2016-02-02 Thread Andrew Davison
Aha, sorry. I created an ~/.ansible.cfg file and placed the remote_user directive in it: [defaults] remote_user=vagrant Then ran the command again: ansible-playbook -i inventory.yml box1.yml --extra-vars="ansible_ssh_user=vagrant" - --private-key=~/.vagrant.d/ insecure_private_key This

Re: [ansible-project] with_inventory_hostname error

2016-02-02 Thread Aurel
Thank you very much for this and for everything ! Le mardi 2 février 2016 15:38:59 UTC+1, Brian Coca a écrit : > > made fix to docs, which were wrong. > > > -- > Brian Coca > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe

[ansible-project] Re: win_template Illegal characters in path

2016-02-02 Thread J Hawkesworth
I'm guessing here that you are getting bitten by the \t part of c:\temp being interpreted as a tab character. try - name: Config file win_template: src=templates/config.j2 dest='C:\temp\test.conf' or if you prefer double quotes: - name: Config file win_template:

[ansible-project] Re: Apt Module report Change at Upgrade process

2016-02-02 Thread Dennis Philpot
OK it seems there is a language Problem. Changing the locale to english and changed=0 is perfekt. -- 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] Delegate_to fails if host is referenced by non-inventory name

2016-02-02 Thread Brian Coca
remote_user is ONLY in play or task, in ansible.cfg has a 'user' option, again, all overridden by ansible_ssh_user -- Brian Coca -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails

Re: [ansible-project] Delegate_to fails if host is referenced by non-inventory name

2016-02-02 Thread Andrew Davison
Well now I'm more confused, because setting remote_user in ansible.cfg did "fix" the problem and also the documentation does list remote_user as a config file setting: http://docs.ansible.com/ansible/intro_configuration.html#remote-user If I set remote_user at the task level: - name: Name

Re: [ansible-project] Re: Apt Module report Change at Upgrade process

2016-02-02 Thread Brian Coca
the default should already be en_us.utf-8, fallback to C if that is not available. -- Brian Coca -- 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] Ssh connection

2016-02-02 Thread Kevin Bullock
> On Feb 2, 2016, at 01:01, Milet Francis wrote: > > Hi.. > I want to establish a ssh connection between 10 servers at the same > time.Is it possible to use ansible to automate this process.If not do u have > any other option. I'm not totally clear on what you

[ansible-project] Re: Using ansible on windows with UAC enabled

2016-02-02 Thread J Hawkesworth
Yeah this stuff is frustrating... You can disable UAC just for Administrators ... [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System] "ConsentPromptBehaviorAdmin"=dword: then re-enable it once you have completed tasks that need it. Windows Registry Editor

Re: [ansible-project] ansible_distribution_major_version on the CLI

2016-02-02 Thread Reece Webb
Well that's annoying. Thanks for the explanation. Reece -- 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. To

Re: [ansible-project] Ansible: apt problem with the colon (packet name)

2016-02-02 Thread AS
As far I know there are two different versions of these libraries (32bit and 64bit). Without i386 only 64bit version is installed. dpkg --add-architecture i386 apt-get -y install libc6:i386 apt-get -y install libncurses5:i386 apt-get -y install libstdc++6:i386 On Tuesday, 2 February 2016

Re: [ansible-project] Ansible: apt problem with the colon (packet name)

2016-02-02 Thread AS
As far I know there are two different versions of these libraries (32bit and 64bit). Without i386 only 64bit version is installed. dpkg --add-architecture i386 apt-get -y install libc6:i386 apt-get -y install libncurses5:i386 apt-get -y install libstdc++6:i386 My reasoning behind is here:

Re: [ansible-project] Ansible: apt problem with the colon (packet name)

2016-02-02 Thread AS
With command prompt it works but with ansible no success. sudo apt-get install libc6:i386 Reading package lists... Done Building dependency tree Reading state information... Done libc6:i386 is already the newest version. 0 to upgrade, 0 to newly install, 0 to remove and 6 not to upgrade.

[ansible-project] Re: win_template Illegal characters in path

2016-02-02 Thread Joe Levis
You were right Jon. I needed to escape the backslashes. This worked: dest="C:\\temp\\test.conf" Thanks! -Joe On Monday, February 1, 2016 at 3:38:05 PM UTC-8, Joe Levis wrote: > > Not sure what I'm doing wrong here. I've tried all different styles of > configuration with no success. I'm

Re: [ansible-project] YUM module Install loop too clever

2016-02-02 Thread Arthur Francis
Thanks Josh, Thats how I overcame the problem, but I was wondering if there was another way in the interests of compactness and efficiency. Thanks Arthur On Monday, 1 February 2016 19:00:47 UTC, Josh Smift wrote: > > If you know that you have one particular page that needs to go first, and >

Re: [ansible-project] unarchive always unzips

2016-02-02 Thread Tuomas-Matti Soikkeli
I believe it's because zip doesn't support it like tar does. So I suppose there is no fix for that other than manually comparing the contents with python ZipFile api. Unfortunately zip lacks most of the unixy features which tar provides like user/group modes, modification date and so on. So

Re: [ansible-project] Ansible: apt problem with the colon (packet name)

2016-02-02 Thread AS
Found workaround: by some reason install works with items but not directly with apt. - name: enable multiarch command: dpkg --add-architecture i386 - name: install deps apt: name={{ item }} update_cache=yes cache_valid_time=3600 with_items: - "libc6:i386" - "libncurses5:i386"

Re: [ansible-project] Delegate_to fails if host is referenced by non-inventory name

2016-02-02 Thread Andrew Davison
Hi, thanks for the reply. Setting remote_user: vagrant does not appear to fix this I'm afraid. I ran the command as: ansible-playbook -i inventory.yml box1.yml --extra-vars="ansible_ssh_user=vagrant remote_user=vagrant" - -- private-key=~/.vagrant.d/insecure_private_key and there was no

[ansible-project] Access facts in custom filter plugin

2016-02-02 Thread Łukasz Górski
Hi there, First post here, if something is amiss on my part, please bear with me. How do I access facts in my own filter plugin? I know I can (and did) write a function and pass the fact as an argument, but perhaps it is possible to get the fact's value in the body of a filter function? My

[ansible-project] Ssh connection

2016-02-02 Thread Milet Francis
Hi.. I want to establish a ssh connection between 10 servers at the same time.Is it possible to use ansible to automate this process.If not do u have any other option. Regards, Milet -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To

[ansible-project] with_inventory_hostname error

2016-02-02 Thread Aurel
Hello, The documentation mentions "with_inventory_hostname" (http://docs.ansible.com/ansible/playbooks_loops.html#looping-over-the-inventory) as an attribute for a task : # show all the hosts in the inventory- debug: msg={{ item }} with_inventory_hostname: all # show all the hosts matching

Re: [ansible-project] Evaluate variable immediately, save for later

2016-02-02 Thread David Karban
Hi, try use handler: - stat: path=/mnt/mysql register: p - name: Create /mnt/mysql directory for database file: path: /mnt/mysql state: directory mode: 0750 owner: mysql group: mysql when: not p.stat.exists notify: - create database handlers: - name: create

Re: [ansible-project] Delegate_to fails if host is referenced by non-inventory name

2016-02-02 Thread Brian Coca
remote_user is not a variable, its a directive, ansible_ssh_user would override it anyways. -- Brian Coca -- 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] Re: bigip_virtual_server

2016-02-02 Thread Heinrich Piard
For those who run into the same issue. This is the actual fix. Thanks Tim! https://github.com/caphrim007/ansible-modules-extras/commit/56a517b054e8b24e23c6781c081db31af3fb2ae7 On Monday, February 1, 2016 at 3:16:42 PM UTC-5, Heinrich Piard wrote: > > Hi Tim, > > it would be wonderful if you

[ansible-project] Display "shell" or "command" STDOUT/STDERR in real time as they execute

2016-02-02 Thread johhue
Hello, I have seen previous posts on this topic but wanted to ask again hoping this is something we are considering now ... Problem: When using Ansible to remotely execute command/shell commands, we cannot see the STDOUT/STDERR of these in-flight commands until the execution is COMPLETE.

[ansible-project] host_vars with .yml

2016-02-02 Thread Warren Seine
Hi, I'm wondering why Ansible picks my variable file when it's called host_vars/local, but not host_vars/local.yml. Can I set a configuration flag to change this behavior? Thanks, Warren. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group.

Re: [ansible-project] Re: Apt Module report Change at Upgrade process

2016-02-02 Thread Dennis Philpot
Hi Brian, i've posted an issue here: https://github.com/ansible/ansible/issues/14264 Am Dienstag, 2. Februar 2016 16:16:37 UTC+1 schrieb Brian Coca: > > the default should already be en_us.utf-8, fallback to C if that is > not available. > > > -- > Brian Coca > -- You received this

[ansible-project] Does get_url prevent caching?

2016-02-02 Thread Joshua J. Kugler
I am trying to download some ISOs to multiple machines (via a proxy to conserve bandwidth). The ISO is being stored by the proxy, and the machine is using the proxy, but it is downloading from the upstream source every time. Squid is showing in its logs: 1454462392.008 532579 192.168.122.10

[ansible-project] Re: Is it possible to run playbook with wildcard tags

2016-02-02 Thread sam liu
The tags parameter will executing as your ordered list but if you want to use wildcard tags will cause some unpredictable problem, it will more like black box, you can not control ansible how to storing the tag list. If you really want to do it, try use xargs command. 在 2016年2月1日星期一

[ansible-project] Re: Is it possible to run playbook with wildcard tags

2016-02-02 Thread sam liu
The tags parameter will executing as your ordered list but if you want to use wildcard tags will cause some unpredictable problem, it will more like black box, you can not control ansible how to storing the tag list. If you really want to do it, try use xargs command. 在 2016年2月1日星期一

[ansible-project] Using ansible on windows with UAC enabled

2016-02-02 Thread Marc Farrow
Hi All, This is a basic question as I'm just getting started with Ansible. I've got this working perfectly on our Linux distributions but not on Windows. Our environment dictates we need UAC enabled and we cannot use the built in administrator account for day to day activities. With ansible