# Automating LDAP integration of artifactory using ansible

**URL:** <https://forum.ansible.com/t/automating-ldap-integration-of-artifactory-using-ansible/32198>\
**Category:** Ansible Project\
**Created:** [February 11, 2020, 11:13am UTC](https://forum.ansible.com/t/automating-ldap-integration-of-artifactory-using-ansible/32198 "2020-02-11T11:13:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vishal\_Bobade](https://avatars.discourse-cdn.com/v4/letter/v/c57346/32.png) [@Vishal\_Bobade](https://forum.ansible.com/u/Vishal_Bobade)\
**Post date:** [February 11, 2020, 11:13am UTC](https://forum.ansible.com/t/automating-ldap-integration-of-artifactory-using-ansible/32198/1 "2020-02-11T11:13:08Z")

</div>

Hi,

could some one help me in understanding if the below yaml code can be used in ansible-playbook to achieve the automation of LDAP integration.

> `security:` `#Security configuration (LDAP, SAML, Password Policy, ...)`  
> `ldapSettings:` `#LDAP server(s) settings`<br>`ldap1:` `#The unique ID of the LDAP setting`<br>```emailAttribute:` `email1 ``#An attribute that can be used to map a user's email to a user created automatically by Artifactory`  
> `ldapPoisoningProtection:` `true` `#When set to true (recommended), Artifactory will protect against LDAP poisoning by filtering out users exposed to vulnerability`<br>`ldapUrl:` `ldap`:`//myserver`:`myport/dc=sampledomain`,`dc=com `#Location of the LDAP server in the following format: ldap://myserver:myport/dc=sampledomain,dc=com. The URL should include the base DN used to search for and/or authenticate users`<br>```search:`<br>```managerDn:` `manager1 `#The full DN of a user with permissions that allow querying the LDAP server. When working with LDAP Groups, the user should have permissions for any extra group attributes such as memberOf`<br>```managerPassword:` `managerpass1 ``#The password of the user binding to the LDAP server when using "search" authentication`  
> `searchBase:` `searchbase1 ``#The Context name in which to search relative to the base DN in the LDAP URL. Multiple search bases may be specified separated by a pipe ( | ). This is parameter is optional`<br>`searchFilter:` `searchfilter1 `#A filter expression used to search for the user DN that is used in LDAP authentication. Possible examples are: uid={0}) - this would search for a username match on the uid attribute. Authentication using LDAP is performed from the DN found if successful`<br>```searchSubTree:` `true` `#When set, enables deep search through the sub-tree of the LDAP URL + Search Base`<br>```userDnPattern:` `userppatt1 `#A DN pattern used to log users directly in to the LDAP database. This pattern is used to create a DN string for “direct” user authentication, and is relative to the base DN in the LDAP URL. For example: uid={0},ou=People`<br>```allowUserToAccessProfile:` `false` `#When set, users created after logging in using LDAP will be able to access their profile page in Artifactory`  
> `autoCreateUser:` `true` `#When set, Artifactory will automatically create new users for those who have logged in using LDAP, and assign them to the default groups`<br>`enabled:` `true` `#When set, these settings are enabled`  
>   
> |
> 
> - |

Samp

---

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [February 12, 2020, 12:59pm UTC](https://forum.ansible.com/t/automating-ldap-integration-of-artifactory-using-ansible/32198/2 "2020-02-12T12:59:40Z")

</div>

Hi

“Automation of ldap integration” can mean a thousand things.

Could you please tell clearly:

- What you are trying to achieve.

- How you are doing this.

- What problems you encounter.

- Which command did you run, and what output did you get from that (copied as text, not as images/attachments/screenshots)

- What the relevant tasks/playbooks/code/variables look like
