Re: [ansible-project] iterate over disk devices

2014-03-31 Thread Paul Durivage
Hi Filip, You'll find that calling the split method on the string works. See this Gist: https://gist.github.com/angstwad/9893480 12345678910 --- - name: Test split hosts: localhost gather_facts: false vars: - facter_blockdevices: sda,sdb,sdc,sdd,sde,sdf tasks: - name: Let's

[ansible-project] Re: Special shell for special users on special host %)

2014-03-31 Thread Petr Sukharev
Hi, Bruce! Yes, it is exactly what i am looking for! Working like charm! Michael, i will use this source in next time, thanks Thanks so much! -- You received this message because you are subscribed to the Google Groups Ansible Project group. To unsubscribe from this group and stop

Re: [ansible-project] iterate over disk devices

2014-03-31 Thread Filip Slunecko
Thank you! I tried jinja filters and they do not work :). I assume I can use any python function there right? On Monday, March 31, 2014 7:28:11 AM UTC-7, Paul Durivage wrote: Hi Filip, You'll find that calling the split method on the string works. See this Gist:

Re: [ansible-project] iterate over disk devices

2014-03-31 Thread Paul Durivage
Hi Filip, No problem! No, not every Python function is available in Jinja. In that example, you see we can use any method associated with string in Jinja, because the string is still an object, and it's methods come with it. Just remember that you always have access to the objects methods.

[ansible-project] Aborting playbook execution during rolling updates?

2014-03-31 Thread Michael Mahemoff
I have parallel hosts configured with serial to ensure rolling updates. But if one fails, I believe the next one will unconditionally still execute, causing the whole cluster to fail. Is there any way to abort the entire playbook execution (or that for serial hosts anyway) if any one host

Re: [ansible-project] Aborting playbook execution during rolling updates?

2014-03-31 Thread James Tanner
I'd send you the link to the docsite, but this will have to do for now: https://github.com/ansible/ansible/blob/devel/docsite/rst/playbooks_delegation.rst#maximum-failure-percentage On Mon, Mar 31, 2014 at 3:07 PM, Michael Mahemoff mich...@mahemoff.comwrote: I have parallel hosts configured

[ansible-project] Checking folder exists

2014-03-31 Thread Francisco Reyes
New to ansible. Trying to create a playbook to do the following: 1 Checks if a user exists and if not create 2 Check if /home/user/.ssh exists and if not create it 3 Copy ssh keys for the user Having a problem with part 2 I have a variable file as follows Ops: - User1: uname: user1

[ansible-project] Import Error with custom Python module

2014-03-31 Thread Jason Edelman
Hi All, I keep getting an ImportError: No module named when I try and run a playbook using a custom python module (that is trying to import a 3rd party python package). Few things: - importing the 3rd party package works from the python shell from all over my machine. - PYTHONPATH seems to

[ansible-project] Creating custom module

2014-03-31 Thread Jason Edelman
Hi All, New guy to Ansible here... - New python module called 'pinger_test.py' and put it in ./ansible/library. - Ran 'make webdocs' while in ./ansible Playbook is: --- - name: ping automated verification testing hosts: routers connection: local gather_facts: no tasks: - name:

[ansible-project] quotes in stderr response is throwing No closing quotation error

2014-03-31 Thread ryan medlin
quotes in stderr response is throwing this error: I am not sure how to escape this properly and why i have to do it at all? failed: [ec2-54-211-211-140.compute-1.amazonaws.com] = {changed: true, cmd: /var/lib/immutant/current/jboss/bin/smoke-test-switchboard-api.sh , delta: 0:00:00.058325,

[ansible-project] new feature: aws elb in a vpc

2014-03-31 Thread klymr
It seems that the aws elb module doesn't do elb in a vpc. I'd like to request this feature. -- 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: Ansible log plugin to output XML

2014-03-31 Thread Sergio Freire
Hello, i'm also searching for the same but still with no luck. I saw some wrappers using perl test::unit and prove but I personaly don't like that solution Regards, Sergio On Wednesday, March 19, 2014 4:55:49 PM UTC, Mark Phillips wrote: Hello folks, Not something I'd ordinarily advocate -

[ansible-project] feature requests for Galaxy

2014-03-31 Thread ramon
Hey all, I've been adding some roles to galaxy, and I'd like to request some features: - I would like to have the roles sorted by alphabet and/or add date on the my roles page - I would like to be able to filter/search the my roles page - I would like to edit the repo url... (I moved some

[ansible-project] Feature proposal: ansible-galaxy roles file to include git url and target versions

2014-03-31 Thread Ben Kersten
Hi, I'm looking to use Ansible at our organisation and in order for us to share roles across projects there are some changes needed to the ansible-galaxy command line tool. The limitations of ansible-galaxy that I wish to address are: * Roles must be published on galaxy.ansible.com or a

[ansible-project] Running tasks in sequence on different hosts

2014-03-31 Thread Henning Juva
Hi, First thanks for a wonderful tool. Best new technology I've used since git. We currently manage about 20 machines using a role based setup described in best practices. So far everything has been easy and intuitive but now I've come across a corner case I'm struggling to fit into the model.

[ansible-project] ansible_user_id has incorrect value when overriding playbook sudo value in a task

2014-03-31 Thread ramon
Hi All, Perhaps I don't understand the ansible_user_id variable, but consider the following cases: https://gist.github.com/ramondelafuente/9819526 When you set a single task to sudo:no when the playbook has sudo: yes (or the other way around), ansibile_ssh_user has an unexpected value. The

[ansible-project] scp_if_ssh not working as intended

2014-03-31 Thread Marc Petrivelli
I am trying to run the following playbook to deploy a key to a number of servers deploy_key.yml: - hosts: servers gather_facts: no user: root vars: - key_file: /root/.ssh/id_rsa.pub tasks: - name: add authorized keys authorized_key: user=root key={{

[ansible-project] Possible to preserve dependency variables?

2014-03-31 Thread mway
Not sure if this is considered an edge case, or if there's a better way to model things (suggestions appreciated). FWIW, I just started using Ansible, so please let me know if there's a more idiomatic approach. Let's say I have a group of docker containers that I want to build images for to

[ansible-project] why is verbose output jsonified by default?

2014-03-31 Thread Cliffano Subagio
Hi, Is there any particular reason why ansible playbook verbose output is jsonified by default? Whenever I set --verbose, the intention is for human to check that output and the default json dump is not readable specially when stdout/stderr contains lots of linefeeds. Wouldn't it be better if

Re: [ansible-project] Issue using apt with prefix

2014-03-31 Thread Tom Bamford
If you really don't want to expand all your package names, something like this may work for you: - name: set apache module package prefix set_fact: apache_mod_prefix=libapache2-mod- - name: install additional modules apt: pkg={{ apache_mod_prefix }}{{ modules|join(',' + apache_mod_prefix)

[ansible-project] Updating Tags in EC2 using module ec2_tags is not working

2014-03-31 Thread Bob Brown
Trying to update tags where the tags are missing on AWS ec2 instances My Playbook looks like this: - name: Add a Tag hosts: foo tasks: register: ec2 local_action: ec2_tag resource={{ item.id }} region=us-east-1 state=present with_items: ec2.instances args: tags:

[ansible-project] Enabling/starting services under OpenWRT

2014-03-31 Thread Adam Nielsen
Hi all, I'm new to Ansible, so I'm testing it out by configuring a new router running OpenWRT. Unfortunately I have gotten stuck pretty early in the process! I have created a playbook to install the BIND daemon and start it, but it keeps complaining that it can't start it because the service

[ansible-project] Ansible docs down? Any mirrors?

2014-03-31 Thread Jason Lefkowitz
Hey all... I've been trying to access the documentation at docs.ansible.com for a couple of hours now, and all I get is Website is offline error messages from CloudFlare. Have the docs moved to a new address or something? If they're still there but the site is just down, does anyone know of

[ansible-project] FYI on Ubuntu 14.04 and synchronize module

2014-03-31 Thread Simon Green
rsync 3.1.0 on Ubuntu 14.04 has a bug that causes an error when coming from rsync 3.0.9 (common on all versions of Ubuntu prior to 14.04) -- You received this message because you are subscribed to the Google Groups Ansible Project group. To unsubscribe from this group and stop receiving emails

[ansible-project] Ansible conditions and logics

2014-03-31 Thread Maxim Odinintsev
Hello, I'm trying migrate out my infrastructure under ansible control, but stopped on simple things realization with ansible. I would be very grateful if some one can explain, best way for moving on this simple shell script under ansible. May be simplest way is running external shell, and not

Re: [ansible-project] Re: Start Service Not Working

2014-03-31 Thread Dick Davies
I've seen this behaviour quite often when a service scripts 'status' command isn't written properly. 'service thingy status' is supposed to return true or false (and optionally print some sort of readable message), and _loads_ tend to return the wrong exit code. You can work around it by falling

[ansible-project] transport=smart, SFTP failures and ssh connections

2014-03-31 Thread Marc Petrivelli
In my ansible.cfg I had the following set: [defaults] transport=smart [ssh_connection] scp_if_ssh=True For one of my target hosts (specifically a VMware vCenter appliance) I received a SFTP disabled error. After investigating this host did in fact have SFTP disabled (on purpose). I am

[ansible-project] Re: FreeBSD support

2014-03-31 Thread Francisco Reyes
On Monday, September 24, 2012 11:43:39 AM UTC-4, nigelm wrote: Is anyone working on enhancing FreeBSD support for the built in modules - specifically the user and service modules? How is FreeBSD support now? Looking for the same as the original author.. users and services. Also how about

[ansible-project] Re: iterate over disk devices

2014-03-31 Thread Věroš Kaplan
Ahoj Filip, I would consider separating facter_blockdevices fact to a list. ( see https://gist.github.com/VerosK/9853931 ). I don't now if this is the right Ansible-way, but at least it works. --Věroš --- - hosts: localhost vars: facter_blockdevices: sda,sdb,sdc,sdd,sde,sdf

Re: [ansible-project] Abridged summary of ansible-project@googlegroups.com - 2 updates in 1 topic

2014-03-31 Thread Michael DeHaan
We would need to see the playbook. On Sun, Mar 30, 2014 at 10:01 PM, Kesten Broughton solarmobiletrail...@gmail.com wrote: that is most likely due to an indentation error, or some other yaml problem upstream of your nova_compute command. On Sun, Mar 30, 2014 at 11:54 AM,

Re: [ansible-project] Aborting playbook execution during rolling updates?

2014-03-31 Thread Michael Mahemoff
Thanks, sorry I missed that in the docs! http://docs.ansible.com/playbooks_delegation.html#rolling-update-batch-size for future reference On Monday, March 31, 2014 8:16:49 PM UTC+1, James Tanner wrote: I'd send you the link to the docsite, but this will have to do for now:

Re: [ansible-project] Re: FreeBSD support

2014-03-31 Thread Michael DeHaan
So you are replying to a post that is a year and a half old. See http://docs.ansible.com/list_of_packaging_modules.html and the user and service modules should do all of what you want. On Sat, Mar 29, 2014 at 7:07 PM, Francisco Reyes franci...@natserv.netwrote: On Monday, September 24,

Re: [ansible-project] Ansible docs down? Any mirrors?

2014-03-31 Thread Michael DeHaan
So this is a known thing: https://twitter.com/ansible/status/450701009363685376 You may go to https://github.com/ansible/ansible/tree/devel/docsite/rst And run ansible-doc modulename to read module docs from the CLI. Connectivity should be restored very soon. On Mon, Mar 31, 2014 at 3:17

Re: [ansible-project] Ansible docs down? Any mirrors?

2014-03-31 Thread Erik Anderson
This was announced on Ansible's Twitter account: https://twitter.com/ansible/status/450701009363685376 Looks like the docs.ansible.com sources are available here: https://github.com/ansible/ansible/tree/devel/docsite On Mon, Mar 31, 2014 at 2:17 PM, Jason Lefkowitz

Re: [ansible-project] Ansible log plugin to output XML

2014-03-31 Thread Serge van Ginderachter
On 19 March 2014 17:55, Mark Phillips m...@probably.co.uk wrote: Not something I'd ordinarily advocate - XML (eugh) - but I was wondering if anybody had done anything with producing run log output as XML? I'm looking at it so I can plug Ansible testing into a CI solution, in this case

Re: [ansible-project] feature requests for Galaxy

2014-03-31 Thread James Cammarata
Thanks, we'll definitely look at adding these. On Thu, Mar 27, 2014 at 6:06 PM, ra...@future500.nl wrote: Hey all, I've been adding some roles to galaxy, and I'd like to request some features: - I would like to have the roles sorted by alphabet and/or add date on the my roles page - I

Re: [ansible-project] FYI on Ubuntu 14.04 and synchronize module

2014-03-31 Thread James Cammarata
Hi Simon, could you open an issue for this on github? Thanks! On Mon, Mar 31, 2014 at 12:57 PM, Simon Green simonjgr...@me.com wrote: rsync 3.1.0 on Ubuntu 14.04 has a bug that causes an error when coming from rsync 3.0.9 (common on all versions of Ubuntu prior to 14.04) -- You received

[ansible-project] Re: Enabling/starting services under OpenWRT

2014-03-31 Thread Adam Morris
Try setting ANSIBLE_KEEP_REMOTE_FILES=1 before you run Ansible and it should leave the files that are copied over using SCP/SFTP. -vvv will show you exactly what it did so you can look at what happened and what went wrong. I hope that this helps, Adam On Friday, March 28, 2014 9:39:41 PM

[ansible-project] Re: Checking folder exists

2014-03-31 Thread Adam Morris
On Saturday, March 29, 2014 3:18:23 PM UTC-7, Francisco Reyes wrote: New to ansible. Trying to create a playbook to do the following: 1 Checks if a user exists and if not create 2 Check if /home/user/.ssh exists and if not create it 3 Copy ssh keys for the user Ansible modules are

Re: [ansible-project] Import Error with custom Python module

2014-03-31 Thread James Cammarata
What is the path to your module? Also, have you checked out http://docs.ansible.com/developing_modules.html to see that your following our instructions for custom module development? On Fri, Mar 28, 2014 at 6:53 AM, Jason Edelman jedelm...@gmail.com wrote: Hi All, I keep getting an

Re: [ansible-project] Ansible docs down? Any mirrors?

2014-03-31 Thread Michael DeHaan
Should be all fine now. On Mon, Mar 31, 2014 at 3:31 PM, Erik Anderson erike...@gmail.com wrote: This was announced on Ansible's Twitter account: https://twitter.com/ansible/status/450701009363685376 Looks like the docs.ansible.com sources are available here:

Re: [ansible-project] Ansible conditions and logics

2014-03-31 Thread James Cammarata
If I understand correctly, you're copying the contents of several directories to a central location, removing the old path, and then creating a symlink to the new location? To do that with ansible you'd just need to call the synchronize module to copy the files (or use command/shell to do the

[ansible-project] Re: Checking folder exists

2014-03-31 Thread Adam Morris
The UserX: variable portion wasn't used so I've removed it... Ops: - uname: user1 passwd: ValidHash - uname: user2 passwd: ValidHash Then your tasks would be something like this... - user: name={{ item.uname }} state=present update_password=on_create password={{ item.password

[ansible-project] Re: Checking folder exists

2014-03-31 Thread Francisco Reyes
On Monday, March 31, 2014 4:32:36 PM UTC-4, Adam Morris wrote: What you want to do here is 2) Add the .ssh directory What module should I use for that? Tried calling mkdir from the shell command, which fails when the folder already exists. Tried looking at the Files Modules, but

[ansible-project] Re: Checking folder exists

2014-03-31 Thread Francisco Reyes
On Monday, March 31, 2014 4:49:34 PM UTC-4, Adam Morris wrote: I was writing a reply to your previous post when you sent this.. - file: path=/home/{{ item.uname }}/.ssh state=directory mode=0700 owner={{item.uname}} with_items: Ops That is what I was looking for thanks. And you

Re: [ansible-project] transport=smart, SFTP failures and ssh connections

2014-03-31 Thread Michael DeHaan
Ok so under ssh_connection this parameter is only for the SSH transport. Paramiko doesn't have this. So what you have for controlling wouldn't be handled by (1) (2) is unlikely to be implemented. So the question is really can paramiko scp all of the time -- I don't particularly recall but I

[ansible-project] Re: Checking folder exists

2014-03-31 Thread Adam Morris
On Monday, March 31, 2014 1:53:19 PM UTC-7, Francisco Reyes wrote: On Monday, March 31, 2014 4:32:36 PM UTC-4, Adam Morris wrote: What you want to do here is 2) Add the .ssh directory What module should I use for that? Tried calling mkdir from the shell command, which fails

[ansible-project] Re: Using when and with_items

2014-03-31 Thread James Goodhouse
I need to make a correction. It seems to work fine when I have just a basic variable set, but I if I use the following it doesn't work. Am I thinking about this wrong? - name: copy template to folder template: src: template.j2 dest: /remote/file/location/{{ item.name }} owner:

Re: [ansible-project] Running tasks in sequence on different hosts

2014-03-31 Thread Brian Coca
sounds like you want multiple plays in the same file and serial: 1 -- 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] Creating custom module

2014-03-31 Thread Brian Coca
remove the .py from the file -- Brian Coca Stultorum infinitus est numerus 0111011100100110010101101110001001110111011000010110011101010010011100110110110101110111001001110111 Pedo mellon a minno -- You received this message because you are subscribed to

Re: [ansible-project] Re: Checking folder exists

2014-03-31 Thread Brian Coca
the authorized_keys module takes care of all of this if you let it manage the .ssh dir. -- 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] roles and compound vars

2014-03-31 Thread Adam Bozanich
Thanks, Michael. I had wanted to be able to pass an entire dict by name into a role, but apparently that isn't possible. I've gotten things to work with vars_files, I'll try restructuring things to work with this. Cheers, -Adam On Monday, March 24, 2014 7:49:04 AM UTC-7, Michael DeHaan