[ansible-project] complicated replace fails to match

2014-11-10 Thread Vince Skahan
I'm trying to append to a line that has a reasonably complicated snippet of python looking code. defaultStatsSchema= [_tuple for _tuple in defaultArchiveSchema if _tuple[0] in stats_types] + [('wind', 'VECTOR')] to that line, I'm trying to add the following: + [('windAv', 'VECTOR')] + [('ou

[ansible-project] Re: Occasional SSH issue when running a playbook. (SSH command stdout empty.)

2014-11-10 Thread Paavo
Hey again. As a workaround, I have now decided to force Ansible to use Paramiko instead of OpenSSH, and my playbooks work. Paavo On Monday, 10 November 2014 09:34:01 UTC+9, Paavo wrote: > > Hi, Everyone. > > > I'm trying to run an Ansible playbook on two servers, and occasionally > either on

[ansible-project] Certificate validation fails within Vagrant

2014-11-10 Thread benjamen . keroack
Hi, I'm developing a testing environment for our Ansible playbooks using Vagrant. I'm using ansible 1.7.2 and vagrant 1.6.5. When I execute a playbook, built-in modules fail SSL certificate validation: - name: wget phantomjs action: get_url args: url: "{{ phantomjs_archive_download_url

[ansible-project] Re: How to get the ouput into one json file or json output

2014-11-10 Thread Darup tek
Thanks, I wil try. On Sunday, November 9, 2014 9:26:59 AM UTC-8, J Dav wrote: > > Check this out > https://github.com/nousdefions/ansible-tricks/tree/master/save_facts > > You can see that in this example I'm also uploading the JSON to S3, but > you can of course fork and tweak it for your use c

[ansible-project] Add stdout and stdout_lines to the results registered by the yum module

2014-11-10 Thread Sankalp Khare
Hi, I've been trying to get some helpful output from playbook runs that use the yum and apt modules. When I register the results of an invocation of these modules, I notice that the apt module very conveniently returns a "stdout_lines" field which contains something that is much more readable

[ansible-project] Re: Executing playbooks from callback, It became slow all of sudden,

2014-11-10 Thread Darup tek
And regular: ansible-playbook command works fine when the playbook is pointed. -- 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...@go

[ansible-project] Executing playbooks from callback, It became slow all of sudden,

2014-11-10 Thread Darup tek
I am using the below function for the past 4 months to orchestrate the installations/depolyments and it was quick. It was working fine and all of a sudden, it became dead slow. I do not remember tweaking settings. def run_playbook(listVMs, playbook, user, extra_vars=None, key_file=None): pr

[ansible-project] Using with_items with ec2_vpc subnets

2014-11-10 Thread Steven Ringo
Hi, The ec2_vpc module is used to create/change both VPCs and its subnets. A with_items iterator on ec2_vpc, as expected, will call ec2_vpc as many times as there are items in the loop. This means there is no way to add a with_items to the subnets parameter inside ec2_vpc It is possible to

Re: [ansible-project] trying win_msi

2014-11-10 Thread Matt Martz
Your indentation is off. the word "tasks" is indented too far. Here is a properly indented playbook: --- - hosts: windows tasks: - name: test msi installer win_msi: path='C:/Home/ansmgr/documents/wixedit-0.7.5.msi' creates='C:\Program Files (x86)\WixEdit\binaries\WixE

[ansible-project] trying win_msi

2014-11-10 Thread skinnedknuckles
Ansible 1.8 CentOs 7 Powershell 3 When I run this playbook --- - hosts: windows tasks: - name: test msi installer win_msi: path='C:/Home/ansmgr/documents/wixedit-0.7.5.msi' creates='C:\Program Files (x86)\WixEdit\binaries\WixEdit'

[ansible-project] insert multiple lines at a particular location within a file

2014-11-10 Thread Vince Skahan
I'm looking for a reasonable way to insert a block of lines into a certain position within a file hopefully 'without' needing to template the destination file. I have a config file that I need to insert multiple lines into. [SectionA] ... many lines below here ... [SectionB] ... many more l

[ansible-project] Managing users at global, group and host levels

2014-11-10 Thread Rishi
I am trying to come up with a scheme for managing users on boxes. I want to be able to selectively choose users at a global, group and host level and then also who is admins (with sudo access basically) on each box at each level as well. One of the ideas I was thinking was a pattern such as thi

[ansible-project] Re: rare ansible error: failed to combine variables, expected dicts but got a 'dict' and a 'list'

2014-11-10 Thread sam
I figured it out, I had vars/main.yml and tasks/main.yml for one of my roles mixed up! i.e. I put tasks in vars/main.yml and vars in tasks/main.yml On Monday, November 10, 2014 1:56:05 PM UTC-5, sam wrote: > > Hi, I am receiving an error that isn't shown anywhere in my search results: > > "ERROR

[ansible-project] rare ansible error: failed to combine variables, expected dicts but got a 'dict' and a 'list'

2014-11-10 Thread sam
Hi, I am receiving an error that isn't shown anywhere in my search results: "ERROR: failed to combine variables, expected dicts but got a 'dict' and a 'list'" Here's the error in its entirety: https://gist.github.com/uunsamp/3d484b1c4a70ca871e9d Here's all the related files: https://gist.git

Re: [ansible-project] parallel execution

2014-11-10 Thread Matt Jaynes
Sounds like some great possible solutions. Either 1) Reading the SSH config to pick up the correct known_hosts locations (and perhaps setting 'host_key_checking' to false if the location is '/dev/null' since that's a common pattern - for instance, Vagrant does this by default, see https://do

[ansible-project] Re: Connection problem with a windows machine since ansible

2014-11-10 Thread J Hawkesworth
Just checking, have you run the powershell script to enable remoting on your windows-vm machine? See http://docs.ansible.com/intro_windows.html#windows-system-prep and this script here: https://github.com/ansible/ansible/blob/devel/examples/scripts/ConfigureRemotingForAnsible.ps1 Until the scr

Re: [ansible-project] tag_Name issue with ec2.py

2014-11-10 Thread jimmy
Thanks for the reply. I wasn't able to update this earlier as the post was being moderated. I was trying to figure out how to group my instances like you would with the standard /etc/ansible/hosts but after RTFM'ing further I discovered I could group them by adding a tag named class and calling

[ansible-project] Proxy setup

2014-11-10 Thread Jochen Hinrichsen
Dear group, i'm trying my first baby steps in ansible, and i'm in trouble w/ regard to proxy setup. The maven playbook i'm reusing from the galaxy seems not to respect the existing environment variables http_proxy/ https_proxy/ ftp_proxy. Internally, the playbook issues a get_url to fetch the

Re: [ansible-project] tag_Name issue with ec2.py

2014-11-10 Thread Michael Peters
This is because tags are not properties on the instance objects. I do agree that it's weird that you can only pick properties of the underlying python object for the destination variable. The list of those properties is available here: http://docs.pythonboto.org/en/latest/ref/ec2.html#module-boto.e

Re: [ansible-project] rax.py issues

2014-11-10 Thread Matt Martz
Do you currently have any servers booting from volumes (cloud block storage)? When booting from a volume, server.image is an empty string, and not a dictionary. I am working on a pull request that will be submitted soon, that will handle servers being booted from a volume. On Fri, Nov 7, 2014 at

[ansible-project] RE: ec2.py inventory tag_Name question

2014-11-10 Thread jimmy
So I wasn't able to track down my previous post about how I can access tag_Name while using ec2.py in place of /etc/ansible/hosts (being moderated) but after taking another look at http://docs.ansible.com/guide_aws.html I was able to figure out how to group up servers using tag_class_tagname so

[ansible-project] Re: reusing roles with environment proxy vars

2014-11-10 Thread Jochen Hinrichsen
Could you resolve the issue? In case yes, i'd be happy to re-use whatever you came up with. On Tuesday, 21 January 2014 17:35:25 UTC+1, Marc wrote: > > Hi there, > > I’m reusing some roles between many hosts and I have a problem where some > hosts require me to use a proxy for internet access.

[ansible-project] tag_Name issue with ec2.py

2014-11-10 Thread jimmy
Hi all. I am running into an issue and I am having trouble figuring out the problem. I am trying to set up Ansible with the ec2.py script replacing /etc/ansible/hosts with ec2.py and I am attempting to list my instances with tag_Name. I am running Ansible inside an Amazon VPC so I have the fo

[ansible-project] Show tag_Name in playbook run

2014-11-10 Thread jimmy
Hi all, I am currently using dynamic inventory for AWS with ec2.py and .ini and I was wondering if there was a way to show the Name tag for my instances during the playbook run. Currently it appears with the private IP addresses: TASK: [stoddard-client | Copy client config] ***

[ansible-project] Occasional SSH issue when running a playbook. (SSH command stdout empty.)

2014-11-10 Thread Paavo
Hi, Everyone. I'm trying to run an Ansible playbook on two servers, and occasionally either one or both of them fail a task with the error "/usr/bin/python: can't open file 'command': [Errno 13] Permission denied". I started looking into why this was happening (and why it was only happening so

[ansible-project] rax.py issues

2014-11-10 Thread Michael Liu
Seeing the following when using rax.py. ./rax.py --list /usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/connectionpool.py:730: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.

[ansible-project] Proxy setup

2014-11-10 Thread Jochen Hinrichsen
Dear group, i'm trying my first baby steps in unusable, and i'm in trouble w/ regard to proxy setup. The maven playbook i'm reusing from the galaxy seems not to respect the existing environment variables http_proxy/ https_proxy/ ftp_proxy. Internally, the playbook issues a get_url to fetch the

[ansible-project] Connection problem with a windows machine since ansible

2014-11-10 Thread youmarva
Hi, I recently install Ansible 1.8, and I'm testing its fonctionnality I recently installed Ansible 1.8 on Debian 7.1, I test its functionality in order to work with. But testing the functionality of Windows logon, I have a connection error as shown below: root@ansible:/etc/ansible# ansible w

[ansible-project] Re: For those at Amazon ReInvent Next Week in Las Vegas

2014-11-10 Thread David Stacy
Heading there Monday night, will stop by! On Friday, November 7, 2014 5:47:25 PM UTC-5, Michael DeHaan wrote: > > We'll have a booth (#1038) and I should be there a fair amount of the time. > > https://reinvent.awsevents.com/files/reInvent-Maps.pdf > > Come by and say hey! > > I'm told there will

Re: [ansible-project] groupname as variable?

2014-11-10 Thread Brian Coca
The variable there is defined for a host, not a group, also avoid using dashes (-) in variable names. It is not clear what you are trying to do here, do you want to add all hosts of a cluster? just the master nodes? ​ -- You received this message because you are subscribed to the Google Groups

Re: [ansible-project] Re: ansible ovirt module

2014-11-10 Thread Vincent Van der Kussen
Hi, I don't know If this can be done on deployment of the template. An option might be to deploy your template and then alter the resource settings one it's available. But this should be added to the module. I currently don't have access to a rhev/ovirt setup to see what has changed in the API.

[ansible-project] Re: ansible ovirt module

2014-11-10 Thread Piet83
Hello, When deploying from a template with the ovirt module it creates the vm with the specs that are defined within the template. Is it possible to adjust the specs when provisioning with the ovirt module? So, is it possible to give more cpu, mem or an other instanc_network to a vm provisioned

[ansible-project] Re: Upgrades and reboots - question

2014-11-10 Thread J Hawkesworth
Just a guess but you might want to have a few seconds of delay set in your wait_for so that there is time for network services and sshd to come back up before ansible goes looking for it. On Monday, November 10, 2014 2:33:55 AM UTC, Patrick Galbraith wrote: > > Hi all! > > We've been working on

Re: [ansible-project] create remote file only if local template exists

2014-11-10 Thread Jordi Funollet
I see how the 'stat + when' pattern would work for a single item, but not when there's a list of templates that must be checked. This code: - local_action: stat path=nginx/{{ item }}.j2 register: nginx_sites_exist with_items: apps would register a var like { "nginx_si

[ansible-project] Re: Inventory: IP's of all group members except self

2014-11-10 Thread Hagai Kariti
If the inventory hostnames are enough, you can do this: {{ groups.SOME_GROUP | difference([inventory_hostname]) | list }} On Friday, November 7, 2014 4:40:26 PM UTC+2, Dirk Louwers wrote: > > Hi, > > I just started out experimenting with roles from Ansible Galaxy. I came > across a role that re