-
Notifications
You must be signed in to change notification settings - Fork 632
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix LDAP secret retrieval #1887
base: devel
Are you sure you want to change the base?
Conversation
Update load_ldap_password_secret.yml to fix LDAP secret retrieval
needs manual testing from developer |
@lorenzo-maffeo-SAP the preceding task which sets In the case of your error, there are 0 secrets in the list. Can you confirm that the Docs here: |
@rooftopcellist the secret is correctly present with the right name, it has a single entry containing the password. |
@lorenzo-maffeo-SAP |
Yes, correct. I have tried a complete new deployment on a local minikube cluster and still experience the same behaviour.
edit: I just noticed after posting this that the secret name is not the same, I copied the files from the system where I originally found the issue and most likely carried the same mistake along with it. Once I fixed the secret name, deployment worked fine
|
Update load_ldap_password_secret.yml to fix LDAP secret retrieval
SUMMARY
When deploying a Tower via Operator and configuring LDAP binding on deployment, LDAP secret cannot be retrieved by the playbook despite following the instructions in the documentation
Fixed file
/roles/installer/tasks/load_ldap_password_secret.yml
to allow correct retrieval of LDAP secret by removing[0]
in lines 12 and 14ISSUE TYPE
Bug fix
ADDITIONAL INFORMATION
Reproduction steps:
awx-operator-controller-manager
task path: /opt/ansible/roles/installer/tasks/load_ldap_password_secret.yml:10\nfatal: [localhost]: FAILED! => {\"msg\": \"The conditional check '\\\"ldap-password\\\" in ldap_password[\\\"resources\\\"][0][\\\"data\\\"]' failed. The error was: error while evaluating conditional (\\\"ldap-password\\\" in ldap_password[\\\"resources\\\"][0][\\\"data\\\"]): list object has no element 0. list object has no element 0\\n\\nThe error appears to be in '/opt/ansible/roles/installer/tasks/load_ldap_password_secret.yml': line 10, column 3, but may\\nbe elsewhere in the file depending on the exact syntax problem.\\n\\nThe offending line appears to be:\\n\\n\\n- name: Load LDAP bind password Secret content\\n ^ here\\n\"}