[ansible-project] Access Vault Pass from inside dynamic inventory

2015-09-11 Thread Tom Paine
I have an executable python file that produces an inventory. Can I access the vault password passed on the command line from the script, or is the script run in isolation from everything else? -- You received this message because you are subscribed to the Google Groups "Ansible Project" group.

[ansible-project] Re: Ansible Vault API (decrypt programmatically)

2015-09-11 Thread Tom Paine
Well, that was easy! import ansible.utils bar = dict() bar = ansible.utils._load_vars_from_path("secrets.yml", results=bar, vault_password="password") print bar On Saturday, September 12, 2015 at 2:34:20 AM UTC+1, Tom Paine wrote: > > Are there any examples of using the Ansible Python API t

[ansible-project] Ansible Vault API (decrypt programmatically)

2015-09-11 Thread Tom Paine
Are there any examples of using the Ansible Python API to decrypt an existing vault file? -- 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+uns

Re: [ansible-project] Where are my inventory variables in a dump hostvars,

2015-09-11 Thread Larry Fast
> > Thanks Brian, I was hoping someone would show me "if not loop.last" :) -- 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...@goog

[ansible-project] Ansible 1.9.4-rc2 is available for testing

2015-09-11 Thread James Cammarata
Hi all, we've just tagged the rc2 release for 1.9.4, which adds a couple more bug fixes. To test from source, simply clone the git repository (if you haven't already) and do the following: $ git checkout v1.9.4-0.2.rc2 $ git submodule update $ . hacking/env-setup After which time you can run ans

Re: [ansible-project] Ansible develop branch, callback_plugins are not triggered

2015-09-11 Thread Brian Coca
profile_tasks was not ported correctly, fixed now. -- 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.c

Re: [ansible-project] Windows - multiple paths with spaces

2015-09-11 Thread Matt Gagliardi
I'm on 1.9.x right now (whatever is in the yum repo for CentOS 6.6)...the past couple of weeks banging around has lead me to think I may want to go up to 2.x, your advice reinforces that. That said...I figured it out. I keep forgetting that I'm effectively running everything in Powershell :) B

Re: [ansible-project] Ansible develop branch, callback_plugins are not triggered

2015-09-11 Thread Frank van Tol
Thanx for pointing me to the whitelist feature. I found the plugins, some have different interfaces (some starting with v2_) and don't seem to work as-is. For example, profile_tasks says to be upgraded to v2 but gives this: [WARNING]: Error when using >: global name 'display' is not defined

Re: [ansible-project] Adding new Galaxy role fails every time...

2015-09-11 Thread Bill Nottingham
It's a known issue with parsing the Unicode characters in the README.md file. We're working to fix that in Galaxy, but if you swap out the apostrophes for the ASCII equivalent, it should work. Bill On Fri, Sep 11, 2015 at 1:15 PM, Christopher Mancini wrote: > Hello, I attempted to add a role t

[ansible-project] Adding new Galaxy role fails every time...

2015-09-11 Thread Christopher Mancini
Hello, I attempted to add a role to Ansible Galaxy, but no matter what I try, it fails to import. I think its not saving the data properly. Here are the details. Repository: https://github.com/basho-labs/ansible-riak Input to 'Add a Role' form: GH User: basho-labs GH Repo: ansible-riak alt name

[ansible-project] Galaxy fails to import new role

2015-09-11 Thread Christopher Mancini
I am attempting to add the repo below. Everytime I try, it seems like it is not saving the data properly and fails to import. Here is the info: GH Repo: https://github.com/basho-labs/ansible-riak Form: - GH User: basho-labs - GH Repo: ansible-riak - alt name: riak-kv Generated role: h

Re: [ansible-project] Windows - multiple paths with spaces

2015-09-11 Thread Chris Church
Which version of Ansible are you using? There are some fixes in 2.0 that addressed argument quoting and issues with spaces in paths. Due to some other recent issues, I might suggest trying 2.0.0-0.2.alpha2 instead of latest devel. On Fri, Sep 11, 2015 at 7:19 AM, Matt Gagliardi wrote: > Good

Re: [ansible-project] Ansible develop branch, callback_plugins are not triggered

2015-09-11 Thread Brian Coca
devel includes it's own timer plugin, you can enable it by updating ansible.cfg: callback_whitelist = timer -- 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, se

[ansible-project] how to fetch and overwrite the file?

2015-09-11 Thread s . lutchko
Hello all, I want to download a file from remote servers: - name: get the result fetch: src=/root/result.xml dest=/var/ansible/result-{{inventory_hostname}}.xml fail_on_missing=yes It looks like if '/var/ansible/result-{{inventory_hostname}}.xml' already exists on my box, then the file

Re: [ansible-project] Please help with YAML stat/fail syntax

2015-09-11 Thread s . lutchko
Thank you, it works. I realize the checks look redundant, it was just attempt to study how it can be used. On Thursday, September 10, 2015 at 5:02:48 PM UTC-4, Brian Coca wrote: > > several errors, each task needs a -, register and when are task > directives and not part of the modules so need

Re: [ansible-project] template module ignoring become_user?

2015-09-11 Thread Brian Coca
Modules don't know anything about become, it gets handled by ansible itself and not the module. We seem to be missing some output as the last command makes the temp dirs and then you get the error on permission denied w/o the command that we attempted to execute. -- Brian Coca -- You received

Re: [ansible-project] template module ignoring become_user?

2015-09-11 Thread Brian Coca
Modules don't know anything about become, it gets handled by ansible itself and not the module. We seem to be missing some output as the last command makes the temp dirs and then you get the error on permission denied w/o the command that we attempted to execute. -- Brian Coca -- You received

Re: [ansible-project] Unable to install software on Windows with v1.9.2 or v2

2015-09-11 Thread Luis Echegaray
my hero! On Thursday, August 27, 2015 at 7:42:53 AM UTC-4, benno joy wrote: > > Hi Matt, > > If you create the a directory name "library" in the same level as your > playbook and copy the win_choclotey.py and chocolatey.ps1 files from > https://github.com/ansible/ansible-modules-extras/tree/deve

[ansible-project] Windows - multiple paths with spaces

2015-09-11 Thread Matt Gagliardi
Good morning all! I'm fairly new to Ansible but I've been banging away at it for several weeks and feel like I'm getting a decent understanding of it. However I've run into an issue I'm struggling with. I have a playbook for Windows Server 2012 R2...95% of it works great. But I'm stuck on l

Re: [ansible-project] ssh to FreeBSD is hanging

2015-09-11 Thread Phil Regnauld
Hi, I have the same problem as the original poster (Hi, bcandler!). Same issue with sshpass hanging. Didn't try with paramiko. -vvv doesn't help here, it just hangs, and ctrl-c shows this: SSH password: ESTABLISH CONNECTION FOR USER: admin REMOTE_MODULE ping EXEC ['sshpass', '-d7', 'ssh', '-

[ansible-project] Ansible develop branch, callback_plugins are not triggered

2015-09-11 Thread Frank van Tol
I am trying to get a timing/profile callback plugin to work, so far I've found several versions, each with different interfaces but none of them are triggered. I did add a callback_plugins item to ansible.cfg. -- You received this message because you are subscribed to the Google Groups "Ansi

[ansible-project] template module ignoring become_user?

2015-09-11 Thread Stephan Hradek
Hi! I'm trying to run a playbook locally and also trying to use the template module here. This is an excerpt from my playbook: --- - hosts: localhost gather_facts: no become: yes become_user: apache vars: version: 1.2 targetdir: /var/apachecontent targetname: www tasks:

Re: [ansible-project] Re: Variables inside variables?

2015-09-11 Thread Stephan Hradek
I'm completely new to all this, but looking at http://jinja.pocoo.org/docs/dev/templates/#variables I'd try to do it like this: environments: prod: vpc_id: 12345 stg: vpc_id: 67890 env: prod debug: msg={{ environments[env].vpc_id }} -- You received this message because you are subs

Re: [ansible-project] Re: Variables inside variables?

2015-09-11 Thread Rob White
If there is no moustache stacking does that mean variables inside variables is impossible? I.e. environments: prod: vpc_id: 12345 stg: vpc_id: 67890 env: prod debug: msg={{ 'environments.' + env + '.vpc_id' }} This just gives me a string of 'environments.prod.vpc_id' but what I wan