[ansible-project] Looping Issue making me Loopy!

2015-01-27 Thread Evan Tahler
Hi All! I cannot sort out how to itterate though this loop properly: I have 2 data dictionaries: applications: - application_1 - application_2 and big_var_collection: application_1: deployment_tasks: - { cmd: 'bundle exec rake thing:1', metadata: 'yay' } - { cmd: 'bundl

Re: [ansible-project] `play` module to group related tasks

2015-01-27 Thread James Cammarata
Yes V2 is usable to a degree - it's passing about 75% of the integration tests we have but it's definitely not finished. You can use it very simply by sourcing v2/hacking/env-setup, just as you would with a regular git checkout of the code. If you try it out and hit a bug, let us know here on the

[ansible-project] ansible-pull, GitHub private repository, deploy key

2015-01-27 Thread Florin Andrei
I might be asking something obvious here, but anyway: I've a private repo on GitHub, with an account on a read-only team there. I would like to run ansible-pull in one step with that repo, but I can't seem to figure out how to tell ansible-pull to use the correct deploy key on GH. The git modul

[ansible-project] set_fact and fact caching

2015-01-27 Thread Giovanni Tirloni
Hi, I'm implementing Ansible on a legacy infrastructure and would like to use it first to assess the damage (i.e. run in check mode). There is some information that I've to gather by running commands, because it doesn't exist as facts, and later I use set_fact to define facts that will be us

Re: [ansible-project] Nested loop: referring to the value of the current item of the outer loop

2015-01-27 Thread Tadej Janež
Hi! Just a quick ping. Does anyone have any idea how I could solve the problem described below? Maybe a work-around? Thanks and best regards, Tadej On Thu, 2015-01-22 at 01:29 -0800, Tadej Janež wrote: > Hi! > > I'm trying to develop a simple backup solution with Ansible. > > My inventory fil

Re: [ansible-project] `play` module to group related tasks

2015-01-27 Thread Grzegorz Nosek
Hi, I'm happy v2 will include equivalent features in the core (please add sudo/sudo_user/remote_user while you're at it). I acknowledge this module is a hack and would be better handled internally, but it does allow for less repetition in playbooks and solves a pain point of mine. Is v2 usable

Re: [ansible-project] How do I return data from powershell to ansible playbook

2015-01-27 Thread Brian Coca
that is pretty much it, ansible expects a couple of things in that json, like failed: true, in case of error changed: true|false as feedback, then the rest can be anything you want, to use this return value you just need to register it to a variable. -- Brian Coca -- You received this messag

Re: [ansible-project] `play` module to group related tasks

2015-01-27 Thread James Cammarata
Hi Grzegorz, You might want to look at the v2 work going on, which will implement some of the features you've noted above (include + with_items and runtime evaluated includes, at least at the task level). Also, another feature we're working on in v2 is the concept of "blocks", which will essentia

Re: [ansible-project] Ansible copy file module to Windows host fails

2015-01-27 Thread Jeffrey Liu
References: https://groups.google.com/forum/#!topic/ansible-devel/Jl5qP73CiKo Place this copy.ps1 to /usr/lib/python2.6/site-packages/ansible/modules/core/windows/copy.ps1 # https://gist.github.com/tkinz27/fd92ba9af0e0309614ee Tho it's probably not needed if you can use the win_url module or

[ansible-project] How to get newline characters to be interpreted using debug and hipchat

2015-01-27 Thread Kathy Allen
Hello. I'm trying to send output via debug and hipchat which I want to appear as multiple lines. But I'm failing. Can anyone advise? In my test below, I of course want the output to show up like this: i am a runon sentence i go on and on Here is my test play and the results. I'm using

Re: [ansible-project] Ansible copy file module to Windows host fails

2015-01-27 Thread Jaime Banda
Can you share your code that works an how did you did it? On Saturday, December 20, 2014 at 10:03:54 AM UTC-7, Jeffrey Liu wrote: > > Thanks. I found out that win_copy has a pull request about to be merged > into 1.9 > > I also found a resource for copy.ps1 which works -- I don't need all the >

[ansible-project] How do I return data from powershell to ansible playbook

2015-01-27 Thread Jaime Banda
We will use ansible to manage Windows servers, I want to return data from my powershell scripts to the playbook that is executing the script, How can I return data from the PS script? I only know that i need to return a json object. -- You received this message because you are subscribed to th

[ansible-project] Ansible Web Configurator: is it interesting to someone?

2015-01-27 Thread Slava Semushin
Hello, I have an idea about creating web app for constructing ansible play books. I've created an example that is semi-working but may be interesting and helpfull for someone. You could find a git repo here: https://github.com/php-coder/ansible-web-configurator (it's just single file with JavaScr

[ansible-project] AWS s3 module and IAM-role-based access control

2015-01-27 Thread Markus Klems
Hi, it seems like the s3 module (http://docs.ansible.com/s3_module.html) does not support a "security_token" parameter (like the ec2 module http://docs.ansible.com/ec2_module.html). This would be desirable, for example, for the following use case: 1. Launch an EC2 instance with IAM role that g

[ansible-project] Unarchive and move

2015-01-27 Thread Warren Seine
Hi, No matter what I do, I cannot find a proper way to extract the content of a directory of a .zip file to a specific directory, without breaking idempotence. Typically, wordpress-4.1.zip contains a "wordpress" directory which contains the files (most archives have a top directory actually).

[ansible-project] Non-task Includes

2015-01-27 Thread baldwin wong
-> % cat playbook1.yml - hosts: 127.0.0.1 gather_facts: false tasks: - name: Task1 shell: echo "This is Task1" - include: playbook2.yml tags=play2 -> % cat playbook2.yml - hosts: 127.0.0.1 gather_facts: false tasks: - name: Task2 shell: echo "This is Task2" - include: play

[ansible-project] Wait for output of command

2015-01-27 Thread Mark Olliver
Hi, I have a command that I need to wait for a completed output from which may take an hour how can I tell ansible to wait (ideally with a timeout so that if it does not get a completed status within the hour then it errors). The command is as follows: ec2-describe-conversion-tasks --region us-e

[ansible-project] Call role multiple times with different tags

2015-01-27 Thread Kevin Porter
>From one ansible script I would like to call a single role multiple times passing different tags in. example: roles: - role: service-name tags: - install - role: get-configs-from-git - role: service-name tags: - configure - start Or i

[ansible-project] Re: More on the "include : {{ foo }}.yml" matter - a long and concrete example

2015-01-27 Thread Grzegorz Nosek
Hi, Please give my module a try: https://github.com/gnosek/ansible-play You should be able to do something like this: tasks: - name: upgrade container play: tasks: - name: undeploy a container include: undeploy_v{{ versions.old }}.yml - name: deploy a container inc

[ansible-project] `play` module to group related tasks

2015-01-27 Thread Grzegorz Nosek
Hi, I just wrote a module that allows for DRYer playbooks, without repeating sudo/when/with_items etc. over and over again in a play (or making lots of small included files). It's on github: https://github.com/gnosek/ansible-play and comes with a couple examples, so I'll just mention it allows

Re: [ansible-project] Re: Help with Idempotent lineinfile regex

2015-01-27 Thread Mark Janssen
In this specific case, you can just add additional 'AllowGroups' lines in the ssh config. Just something I ran into last week as well... All the different AllowGroups (and AllowUsers, DenyGroups, DenyUsers) lines are appended, so there is no need to add entries to an existing line. I just have a t