Saltstack Official Linux Formula
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

69 líneas
1.5KB

  1. {%- from "linux/map.jinja" import ldap with context -%}
  2. # /etc/nslcd.conf
  3. # nslcd configuration file. See nslcd.conf(5)
  4. # for details.
  5. # The user and group nslcd should run as.
  6. uid {{ ldap.uid }}
  7. gid {{ ldap.gid }}
  8. {%- if ldap.enabled %}
  9. {%- if ldap.uri is defined %}
  10. # The location at which the LDAP server(s) should be reachable.
  11. uri {{ ldap.uri }}
  12. {%- endif %}
  13. {%- if ldap.base is defined %}
  14. # The search base that will be used for all queries.
  15. base {{ ldap.base }}
  16. {%- endif %}
  17. # The LDAP protocol version to use.
  18. ldap_version {{ ldap.version }}
  19. {%- if ldap.binddn is defined %}
  20. # The DN to bind with for normal lookups.
  21. binddn {{ ldap.binddn }}
  22. {%- if ldap.bindpw is defined %}
  23. bindpw {{ ldap.bindpw }}
  24. {%- endif %}
  25. {%- endif %}
  26. {%- if ldap.rootpwmoddn is defined %}
  27. # The DN used for password modifications by root.
  28. rootpwmoddn {{ ldap.rootpwmoddn }}
  29. {%- endif %}
  30. # SSL options
  31. #ssl off
  32. #tls_reqcert never
  33. #tls_cacertfile /etc/ssl/certs/ca-certificates.crt
  34. # The search scope.
  35. scope {{ ldap.scope }}
  36. {%- if ldap.pagesize is defined %}
  37. pagesize {{ ldap.pagesize }}
  38. {%- endif %}
  39. {%- if ldap.referrals is defined %}
  40. referrals {{ ldap.referrals }}
  41. {%- endif %}
  42. {%- if ldap.filter is defined %}
  43. # Filters
  44. {%- for key, value in ldap.filter.iteritems() %}
  45. filter {{ key }} {{ value }}
  46. {%- endfor %}
  47. {%- endif %}
  48. {%- if ldap.map is defined %}
  49. # Mappings
  50. {%- for map_name,map in ldap.map.iteritems() %}
  51. {%- for key, value in map.iteritems() %}
  52. map {{ map_name }} {{ key }} {{ value }}
  53. {%- endfor %}
  54. {%- endfor %}
  55. {%- endif %}
  56. {%- endif %}