Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ldap-server:
- pkg.installed:
- - name: openldap-server
- file.managed:
- - name: /usr/local/etc/openldap/slapd.conf
- - source: salt://ldap/files/slapd.conf
- - template: jinja
- - user: root
- - group: wheel
- - mode: 644
- - makedirs: True
- - require:
- - pkg: ldap-server
- service.running:
- - name: slapd
- - enable: True
- ldap.managed:
- - connect_spec:
- url: ldapi:///
- bind:
- method: simple
- dn: cn=Manager,dc=example,dc=com
- password: password
- - entries:
- - cn=ldapgroup,ou=groups,dc=example,dc=com
- - replace:
- cn:
- - ldapgroup
- description:
- - A Test LDAP group
- objectClass:
- - top
- - posixGroup
- gidNumber:
- - 7865
- Succeeds except for this
- ----------
- ID: ldap-server
- Function: ldap.managed
- Result: False
- Comment: An exception occurred in this state: Traceback (most recent call last):
- File "/var/tmp/.necronian_369328_salt/py2/salt/state.py", line 1744, in call
- **cdata['kwargs'])
- File "/var/tmp/.necronian_369328_salt/py2/salt/loader.py", line 1702, in wrapper
- return f(*args, **kwargs)
- File "/var/tmp/.necronian_369328_salt/py2/salt/states/ldap.py", line 250, in managed
- connect = __salt__['ldap3.connect']
- File "/var/tmp/.necronian_369328_salt/py2/salt/loader.py", line 1086, in __getitem__
- func = super(LazyLoader, self).__getitem__(item)
- File "/var/tmp/.necronian_369328_salt/py2/salt/utils/lazy.py", line 98, in __getitem__
- return self._dict[key]
- KeyError: 'ldap3.connect'
- Started: 23:18:24.845509
- Duration: 1.928 ms
- Changes:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement