Add error message on ldap lookup
							parent
							
								
									00265356db
								
							
						
					
					
						commit
						fb1bc15133
					
				|  | @ -1,10 +1,18 @@ | |||
| """ | ||||
| To use this lookup plugin, you need to pass ldap: | ||||
| ssh -L 1636:172.16.10.1:636 172.16.10.1 | ||||
| """ | ||||
| 
 | ||||
| import ipaddress | ||||
| 
 | ||||
| from ansible.errors import AnsibleError, AnsibleParserError | ||||
| from ansible.plugins.lookup import LookupBase | ||||
| from ansible.utils.display import Display | ||||
| 
 | ||||
| import ldap | ||||
| try: | ||||
|     import ldap | ||||
| except ImportError: | ||||
|     raise AnsibleError("You need to install python3-ldap") | ||||
| 
 | ||||
| display = Display() | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue