Advertisement
Guest User

Untitled

a guest
Dec 23rd, 2016
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.92 KB | None | 0 0
  1. ldap-server:
  2. pkg.installed:
  3. - name: openldap-server
  4. file.managed:
  5. - name: /usr/local/etc/openldap/slapd.conf
  6. - source: salt://ldap/files/slapd.conf
  7. - template: jinja
  8. - user: root
  9. - group: wheel
  10. - mode: 644
  11. - makedirs: True
  12. - require:
  13. - pkg: ldap-server
  14. service.running:
  15. - name: slapd
  16. - enable: True
  17. ldap.managed:
  18. - connect_spec:
  19. url: ldapi:///
  20. bind:
  21. method: simple
  22. dn: cn=Manager,dc=example,dc=com
  23. password: password
  24. - entries:
  25. - cn=ldapgroup,ou=groups,dc=example,dc=com
  26. - replace:
  27. cn:
  28. - ldapgroup
  29. description:
  30. - A Test LDAP group
  31. objectClass:
  32. - top
  33. - posixGroup
  34. gidNumber:
  35. - 7865
  36.  
  37. Succeeds except for this
  38. ----------
  39. ID: ldap-server
  40. Function: ldap.managed
  41. Result: False
  42. Comment: An exception occurred in this state: Traceback (most recent call last):
  43. File "/var/tmp/.necronian_369328_salt/py2/salt/state.py", line 1744, in call
  44. **cdata['kwargs'])
  45. File "/var/tmp/.necronian_369328_salt/py2/salt/loader.py", line 1702, in wrapper
  46. return f(*args, **kwargs)
  47. File "/var/tmp/.necronian_369328_salt/py2/salt/states/ldap.py", line 250, in managed
  48. connect = __salt__['ldap3.connect']
  49. File "/var/tmp/.necronian_369328_salt/py2/salt/loader.py", line 1086, in __getitem__
  50. func = super(LazyLoader, self).__getitem__(item)
  51. File "/var/tmp/.necronian_369328_salt/py2/salt/utils/lazy.py", line 98, in __getitem__
  52. return self._dict[key]
  53. KeyError: 'ldap3.connect'
  54. Started: 23:18:24.845509
  55. Duration: 1.928 ms
  56. Changes:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement