Red Hat Bugzilla – Bug 1583523
Inventory variable values with hash sign not properly escaped
Last modified: 2018-05-29 11:36:09 EDT
Description of problem: Having an OpenStack provider where the password contains a hash sign (#) the openshift_cloudprovider_openstack_password variable value should be escaped twice in order to make it work. Version-Release number of the following components: [cloud-user@crio-bastion ~]$ rpm -q openshift-ansible openshift-ansible-3.9.27-1.git.0.52e35b5.el7.noarch [cloud-user@crio-bastion ~]$ rpm -q ansible ansible-2.4.4.0-1.el7ae.noarch [cloud-user@crio-bastion ~]$ ansible --version ansible 2.4.4.0 config file = /home/cloud-user/ansible.cfg configured module search path = [u'/home/cloud-user/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python2.7/site-packages/ansible executable location = /usr/bin/ansible python version = 2.7.5 (default, Feb 20 2018, 09:19:12) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] How reproducible: Run the installer with the OSP password configured as: openshift_cloudprovider_openstack_password=mypasswordwith###hashsigns Steps to Reproduce: 1. Try to deploy OCP using the ansible installer with the variable previously explained 2. 3. Actual results: Authentication failed when starting the master API. Expected results: API start ok Additional info: The /etc/origin/cloudprovider/openstack.conf file is configured as: [Global] auth-url = https://myurl username = myusername password = mypasswordwith###hashsigns domain-name = whatever tenant-name = whatever region = whatever After a few tries, if the variable is 'double escaped' as: openshift_cloudprovider_openstack_password='"mypasswordwith###hashsigns"' the openstack.conf file generated is [Global] auth-url = https://myurl username = myusername password = "mypasswordwith###hashsigns" domain-name = whatever tenant-name = whatever region = whatever And it works.