What you want is something like:

percona_pckg_version: "{{ percona_version|replace('.', '') }}"

You might want to read up on jinja2 a little at
http://jinja.pocoo.org/docs/dev/templates/

{% %} are used for control structures such as `for` and `if`, where as {{
}} are used to denote "expressions to print"

On Sat, Mar 26, 2016 at 1:00 PM, Meher Garda <[email protected]> wrote:

> In my default folder , main.yml I have the following
>
> percona_version: 5.6
> percona_pckg_version: "{% {{percona_version}}|replace('.', '') %}"     #
> want to remove the period in 5.6 so as to get 56
>
> The above gives error while running playbook
>
> fatal: [x.x.x.x] => Failed to template {{percona_pckg_version}}: Failed to
> template {% percona_version|replace('.', '') %}: template error while
> templating string: Encountered unknown tag 'percona_version'.
>
> Any ideas?
>
> --
> 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/7a37a87f-5cd1-4d53-947b-70f5731c3ddd%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/7a37a87f-5cd1-4d53-947b-70f5731c3ddd%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Matt Martz
@sivel
sivel.net

-- 
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/CAD8N0v-Yj2V0wR%2BqASnwd8J6YsG4u6U-OYYaeBTxMAs5mjdqAQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to