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
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
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
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,
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:
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
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
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
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')
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]
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
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
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
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
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
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
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
+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,
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
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].
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
21 matches
Mail list logo