Hello,
- name: Determining Source Account DB Password
shell: cat wp-config.php | grep DB_PASSWORD | awk -F"['']" '{print $4}'
register: wp_dbpw_source
If the password contains a backslash, the output doubles the number of
backslashes.
abc\*# becomes abc\\*#
I'm aware extra escape characters are only for display purposes, and not
actually sent to the command.
But the distorted password output prevents the script from accessing the
database. When I remove the backslash from the password, the script works
again.
Is there a way to output a shell command using grep, cat or awk that
doesn't cause this distortion?
Thanks,
Mark T.
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/acbd9abb-8f6d-4847-8d46-7d87fa1d15b6%40googlegroups.com.