Hi Ansible developers,
I've been wondering about something. Ansible's syntax for module arguments
is key=value parameters, all on a single line. This then needs to be
parsed, and the key=value elements properly separated.
Wouldn't it be much nicer if the module parameters were also just written
in YAML syntax? For example:
- hosts: all
tasks:
- name: blah
yum:
- name: package
- state: installed
And it might even be an idea to pass the playbook through Jinja first,
allowing things like:
- name: blah
yum:
{% for pkg in packages %}
- name: "{{ pkg }}"
- state: installed
{% endfor %}
We would not need the "when:" conditional, or the shlex module to split
key=value pairs. This would allow taking full advantage of Jinja's
templating features.
Could this be an idea for Ansible 2.0?
Regards,
Anand
--
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/34adf7d7-5d32-459d-a3a3-8fe02d049271%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.