Open mrj1m0thy opened 6 years ago
My problem with that is that the configuration isn't saved when I click "Save" in the UI. Load another page and come back and the config is gone. Either way, I'm automating a ansible tower deployment so the command line is a necessity.
@mrj1m0thy check out my ansible module for examples of how to use the tower cli code to modify ldap settings. https://github.com/skamithi/ansible-tower-ldap-settings/blob/master/library/tower_ldap_settings.py
@mrj1m0thy I had the same question as yours and I was finally able to set the AUTH_LDAP_*
settings using the following tower-cli
syntax:
tower-cli setting modify AUTH_LDAP_USER_ATTR_MAP "{'first_name': 'givenName', 'last_name': 'sn', 'email': 'mail'}"
I'm trying to use the following command: tower-cli setting modify AUTH_LDAP_USER_SEARCH
However, I can't find any documentation or any relevant source that explains what the expected value is supposed to be. Closest thing is what it is represented as in the /etc/awx/setting.py which is the following:
AUTH_LDAP_USER_SEARCH = LDAPSearch("ou=users,dc=example,dc=com", ldap.SCOPE_SUBTREE, "(uid=%(user)s)")
I've tried running the command with the above formatting to no avail. Would greatly appreciate any assistance! Thanks