Hi,
I would like to be able to sort-of compile a playbook. Ideally I'd like to
be able to see my playbook with all variables fully resolved (useful for
some tools we are using to reason about Ansible).
For example; something like this would replace all {{ }} code with the real
variables.
```
- hosts: localhost
connection: local
gather_facts: false
vars_files:
- "../vars/all.yml"
- "../vars/{{ env }}.yml"
tasks:
- name: create rabbitmq-internal stack
cloudformation:
stack_name: "{{ rabbitmq_internal_stack }}"
state: "present"
disable_rollback: true
region: "{{ cfn_aws_region }}"
template: "../templates/rabbitmq-internal.json"
template_parameters:
name: "rabbitmq-internal"
public: "false"
environment: "{{ env }}"
```
We have a simplar shell based parser but this is a dirty hack ( and fails
on more complex j2 pipes). What would be the best approach to have Ansible
do it? It must do the variable resolution so I figure we can back on to
that. I've not looked at the code yet but figured some one might have done
it all ready or perhaps a guru can point me to an elegant hack?
Many thanks for any pointers,
Matt.
--
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/daebe7ba-4b12-4fb0-b78e-20864503f968%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.