Debian Codegraph @

ansible_collections/theforeman/foreman/roles/auth_sources_ldap/README.md

raw symbols SCIP
1 theforeman.foreman.auth_sources_ldap
2 ====================================
3
4 This role manages LDAP authentication sources, allowing users from an external source such as Active Directory or
5 FreeIPA to authenticate to Foreman.
6
7 Role Variables
8 --------------
9
10 This role supports the [Common Role Variables](https://github.com/theforeman/foreman-ansible-modules/blob/develop/README.md#common-role-variables).
11
12 The main data structure for this role is the list of `foreman_auth_sources_ldap`. Each `auth_source_ldap` requires the following fields:
13
14 - `name`: The name of the authentication source.
15
16 For all other fields see the `auth_source_ldap` module.
17
18 Example Playbooks
19 -----------------
20
21 Configure FreeIPA as an authentication source, with automatic registration:
22
23 ```yaml
24 - hosts: localhost
25 roles:
26 - role: theforeman.foreman.auth_sources_ldap
27 vars:
28 foreman_server_url: https://foreman.example.com
29 foreman_username: "admin"
30 foreman_password: "changeme"
31 foreman_organization: "ACME"
32 foreman_auth_sources_ldap:
33 - name: "Example LDAP"
34 host: "ldap.example.org"
35 onthefly_register: true
36 account: uid=ansible,cn=sysaccounts,cn=etc,dc=example,dc=com
37 account_password: secret
38 base_dn: dc=example,dc=com
39 groups_base: cn=groups,cn=accounts, dc=example,dc=com
40 server_type: free_ipa
41 attr_login: uid
42 attr_firstname: givenName
43 attr_lastname: sn
44 attr_mail: mail
45 attr_photo: jpegPhoto
46 state: present
47 ```
48
49 To instead integrate with Active Directory, only allowing users who are member of the "Domain Users" group:
50
51 ```yaml
52 - hosts: localhost
53 roles:
54 - role: theforeman.foreman.auth_sources_ldap
55 vars:
56 foreman_server_url: https://foreman.example.com
57 foreman_username: "admin"
58 foreman_password: "changeme"
59 foreman_organization: "ACME"
60 foreman_auth_sources_ldap:
61 - name: "Example AD"
62 host: "ad.example.org"
63 onthefly_register: true
64 account: EXAMPLE\ansible
65 account_password: secret
66 base_dn: cn=Users,dc=example,dc=com
67 groups_base: cn=Users,dc=example,dc=com
68 server_type: active_directory
69 attr_login: sAMAccountName
70 attr_firstname: givenName
71 attr_lastname: sn
72 attr_mail: mail
73 ldap_filter: (memberOf=CN=Domain Users,CN=Users,DC=example,DC=com)
74 state: present
75 ```