Skip to content

Commit

Permalink
Merge pull request #21 from k-304/netbox-ldap-standby
Browse files Browse the repository at this point in the history
Allow enabling/disabling of LDPA always update user option (#21)

* Allow enabling/disabling of ldap always update user option

* Fix typo
  • Loading branch information
k-304 authored and urscale committed May 29, 2024
1 parent dc2a392 commit d9171a0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ansible/roles/netbox/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,15 @@ netbox__ldap_object_owner_rdn: 'uid={{ lookup("env", "USER") }}'
netbox__ldap_object_ownerdn: '{{ ([netbox__ldap_object_owner_rdn, netbox__ldap_people_rdn]
+ netbox__ldap_base_dn) | join(",") }}'
# ]]]

# .. envvar:: netbox__ldap_always_update_user [[[
#
# Always update users in database upon login.
# Needs False for secondary nodes with read-only Database.
netbox__ldap_always_update_user: True
# ]]]
# ]]]

# LDAP connection options [[[
# ---------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,6 @@ AUTH_LDAP_USER_ATTR_MAP = {
"last_name": environ.get('AUTH_LDAP_ATTR_LASTNAME', 'sn'),
"email": environ.get('AUTH_LDAP_ATTR_MAIL', 'mailAddress')
}

# Set to False to allow LDAP logins on secondary (read-only DB) instances
AUTH_LDAP_ALWAYS_UPDATE_USER = {{ netbox__ldap_always_update_user }}

0 comments on commit d9171a0

Please sign in to comment.