error in templating jinja replace "." with nothing

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?

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”