I’m running into a strange problem - the same command runs fine in the Tower but is failing in the AWX:
- name: Search user in the Database
command: >
mysql --user=“{{ dbUserName }}” --password=“{{ dbPassword }}” “{{ dbDatabaseName }}” --host=“{{ dbServerIP }}”
–batch --skip-column-names --execute=“SELECT user_id FROM users WHERE username=‘{{ tower_user_name }}’;”
register: existing_user_id
When I check the “_raw_params”, there is an extra backslash character in the values. I’ve tried all kind of options to remove it but wasn’t lucky.
This example from the Tower and it works:
“_raw_params”: “mysql --user="dbAgent" --password="secret" "db_table" --host="95.25.220.204" --batch --skip-column-names --execute="SELECT user_id FROM users WHERE username=‘user1’;"”,
This one from the AWX where is failing:
“_raw_params”: “mysql --user=\“dbAgent\” --password=\“secret\” \“db_table\” --host=\“95.25.220.204\” --batch --skip-column-names --execute=\“SELECT user_id FROM users WHERE username=‘user1’;\””,