Skip to content

Commit

Permalink
Use ldap container hostname for LDAP config (ansible#14473)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheRealHaoLiu authored and djyasin committed Sep 11, 2024
1 parent 8d52d17 commit ac74a85
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions tools/docker-compose/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -442,13 +442,11 @@ Now we are ready to configure and plumb OpenLDAP with AWX. To do this we have pr

Note: The default configuration will utilize the non-tls connection. If you want to use the tls configuration you will need to work through TLS negotiation issues because the LDAP server is using a self signed certificate.

Before we can run the playbook we need to understand that LDAP will be communicated to from within the AWX container. Because of this, we have to tell AWX how to route traffic to the LDAP container through the `LDAP Server URI` settings. The playbook requires a variable called container_reference to be set. The container_reference variable needs to be how your AWX container will be able to talk to the LDAP container. See the SAML section for some examples for how to select a `container_reference`.

Once you have your container reference you can run the playbook like:
You can run the playbook like:
```bash
export CONTROLLER_USERNAME=<your username>
export CONTROLLER_PASSWORD=<your password>
ansible-playbook tools/docker-compose/ansible/plumb_ldap.yml -e container_reference=<your container_reference here>
ansible-playbook tools/docker-compose/ansible/plumb_ldap.yml
```


Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"AUTH_LDAP_1_SERVER_URI": "ldap://{{ container_reference }}:389",
"AUTH_LDAP_1_SERVER_URI": "ldap://ldap:1389",
"AUTH_LDAP_1_BIND_DN": "cn=admin,dc=example,dc=org",
"AUTH_LDAP_1_BIND_PASSWORD": "admin",
"AUTH_LDAP_1_START_TLS": false,
Expand Down

0 comments on commit ac74a85

Please sign in to comment.