Description of problem: Do str_replace in a single pass, this is needed in some part to fix node naming issues in tripleo as discussed in https://bugzilla.redhat.com/show_bug.cgi?id=1353920#c20 and is used as a tracker for https://review.openstack.org/#/c/355583/ that should be merged soon.
The patch merged upstream and will be in the Newton-rc1 build.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHEA-2016-2948.html