quote filter also didn't work. Got the below error
template error while templating string: unexpected char u\"'\"
On Wednesday, August 22, 2018 at 5:41:58 PM UTC+5:30, Jean-Yves LENHOF
wrote:
>
> Le 2018-08-22 14:00, Veena a écrit :
> > Hi,
> >
> > I'm using Ansible 2.5 and trying to escape single quote in a string.
> > This string will be passed as argument to shell command.
> >
> > regex_replace("'", "\'") is giving error.
> >
> > - set_fact:
> >
> > default_passphrase: "{{ Secrete123'!#) | regex_replace('"'"',
> > '"\'"') }}"
> >
> > Please suggest how to achieve this.
> >
> > Thanks,
> > -Veena
> >
> > --
> > 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] <javascript:>.
> > To post to this group, send email to [email protected]
> <javascript:>.
> > To view this discussion on the web visit
> >
> https://groups.google.com/d/msgid/ansible-project/d4d5b7b0-3ee9-49c9-bdcd-cc13cac7cb30%40googlegroups.com
>
> > [1].
> > For more options, visit https://groups.google.com/d/optout.
> >
> >
> > Links:
> > ------
> > [1]
> >
> https://groups.google.com/d/msgid/ansible-project/d4d5b7b0-3ee9-49c9-bdcd-cc13cac7cb30%40googlegroups.com?utm_medium=email&utm_source=footer
>
>
> Hi,
>
> Did you try with the quote filter ?
>
> Regards,
>
> JYL
>
--
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/60173ba3-31e9-4422-8d4c-f15969296469%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.