Re: [ansible-project] Passing complex data (JSON) to a module

2015-04-28 Thread Jan-Piet Mens
The data type of 'zones' appears to actually be a list. Switching the type to 'list' appears to resolve your issue. With 2.0 yes. I swear this didn't work on 1.8.something ... (Can't test now though.) Thank you. -JP -- You received this message because you are subscribed to the

Re: [ansible-project] Passing complex data (JSON) to a module

2015-04-27 Thread Jan-Piet Mens
The problem is that the key value parsing is reading zones as a string instead of as a list. In my testing either of these alternatives will work: - name: COMplex DATa comdata: zlist: {{ zones }} register: n Followup after testing: yes, that works, but what the module gets isn't

Re: [ansible-project] Passing complex data (JSON) to a module

2015-04-24 Thread Jan-Piet Mens
In my testing either of these alternatives will work: Thank you very much, Toshio! -JP -- 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] Passing complex data (JSON) to a module

2015-04-21 Thread Jan-Piet Mens
have you tried?: zlist= dict(required=True, type=dict) I tried 'dict' in single quotes with no noticeable difference. zlist= dict(required=True, type='dict') default type is a string, which you would have to json.loads to create a complex structure. That's what I thought,

[ansible-project] Passing complex data (JSON) to a module

2015-04-20 Thread Jan-Piet Mens
How can I obtain a complex data structure within an Ansible module? Given the following vars_file: --- zones: - { zone: one.de,policy: rfc5011 } - { zone: thirteen.com, policy: default } with this playbook --- - hosts:

Re: [ansible-project] substring variables?

2015-04-03 Thread Jan-Piet Mens
Is there any functionality for this? The variable is a Jinja2 string, so you can split it like a Python string: {{ host }}- prd01denutl01 {{ host[0:4] }} - prd0 {{ host[5:7] }} - de -JP -- You received this message because you are subscribed to

Re: [ansible-project] -b and password prompting in ansible 1.9

2015-03-29 Thread Jan-Piet Mens
I wonder if that is why that is the switch for password on ldap tools passWord because it came after `p'ort IIRC ;-) -JP -- 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] K-root (DNS instance) uses Ansible

2015-03-11 Thread Jan-Piet Mens
Just a small quote regarding K-root (DNS) from the good folk at RIPE [1]: Configuration management of our K-root server platforms is now automated almost entirely, using a customised tool set based on Ansible. This eases the day-to-day operations effort for our

Re: [ansible-project] Ansible and name resolution

2015-02-21 Thread Jan-Piet Mens
nice! Submitted as PR #10311 https://github.com/ansible/ansible/pull/10311 IMO, dnstxt.py should be removed, and the docs updated to say Users of the previously-available `dnstxt` lookup-plugin should migrate to `dig` by changing lookup('dnstxt', 'example.com')

Re: [ansible-project] Ansible and name resolution

2015-02-20 Thread Jan-Piet Mens
Using the 'pipe' lookup you can use the output of a command, e.g. dig +short my.dns.name Charles' question, and Serge's response prompted me to finally get something done about this. Test at your own risk. [1] ;-) -JP [1]

Re: [ansible-project] Re: special dict hostvars

2015-02-19 Thread Jan-Piet Mens
You can check out my branch here to test that: As mentioned to you privately, this reports KeyError '127.0.0.1' on a template which contains {% for host in hostvars %} {{ host }} {% endfor %} Regards, -JP -- You received this message because you are

Re: [ansible-project] Re: special dict hostvars

2015-02-18 Thread Jan-Piet Mens
Thanks Brian, but that also no longer works, at least not for me. I've put up an example here: https://p.6core.net/p/yIT8nVBZXlOJyZERHoxA3Rmz Am I misunderstanding what hostvars _should_ contain? Regards, -JP -- You received this message because you are subscribed to the Google

Re: [ansible-project] invisible ansible

2014-06-13 Thread Jan-Piet Mens
I would like to make ansible usage 'invisible' (due to some strange policies to use puppet even for the smallest stuff). mv ansible puppetthing mv ansible-playbook puppetotherthing Sorry. I couldn't resist. -JP -- You received this message because you are

Re: [ansible-project] ERROR: A vault password must be specified to decrypt data

2014-04-15 Thread Jan-Piet Mens
Any hints what am I doing wrong? Well, for one, you're confusing the heck out of me... ;) You want to specify the password to a vault file in clear text in a playbook so that a task can unlock the vault? If that's the case, this is all wrong. Vault is designed to *hide* passwords; I think what

Re: [ansible-project] file in vault (ssh private key)

2014-03-05 Thread Jan-Piet Mens
my particular use case is an SSH private key file (password-less, used to enable jumping between servers in a cluster). normally i'd stick this in the files folder and use the copy module to push it. A bit convoluted maybe, but base64-encode the file, and add it to a YAML vars file which is

Re: [ansible-project] file in vault (ssh private key)

2014-03-05 Thread Jan-Piet Mens
i believe that openssh private key files are already text encoded; it looks this way on my servers. this approach had occurred to me also - but can I write a simple, elegant task to get this variable into the file on the hosts? that's the part that wasn't obvious to me. They are

Re: [ansible-project] Fetch from URL to local machine and then copy to remote

2014-02-07 Thread Jan-Piet Mens
I am looking for a way to download a file to the local machine where ansible was started and then copy that file to the remote server. action: get_url ... action: copy ... -JP -- You received this message because you are subscribed to the Google Groups Ansible Project group. To

Re: [ansible-project] Re: Forums vs mailing list? Here's a short 2-question voting survey.

2014-01-11 Thread Jan-Piet Mens
+1 for each paragraph == +4. -JP -- 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 this group,

Re: [ansible-project] Reporting changed state by email

2014-01-10 Thread Jan-Piet Mens
Are any of you using nay clever tricks to parse the log file and email output of just changed tasks back to a defined address? Id' love to be able to know when ansible has fixed something on one or more of my boxes. I think a callback plugin may be what you want, as you can 'trigger' on all

Re: [ansible-project] Reporting changed state by email

2014-01-10 Thread Jan-Piet Mens
Thanks for these pointers JP. The mail plugin looks interesting, and is probably what I need. How do I call it from a playbook though? You don't -- that's the magic. :-) You configure Ansible to use that callback plugin by dropping into the directory you configure for callback plugins [1].

Re: [ansible-project] Re: Remote script module, 'script' for 0.9 (rough cut)

2013-11-20 Thread Jan-Piet Mens
Jerome, Would you still accept a patch adding creates= and removes= to the script module ? +1 !!! -JP -- 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