Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ansible_ldap_authentication
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sti-cluster
ansible_ldap_authentication
Commits
a1dac7cc
Commit
a1dac7cc
authored
4 years ago
by
Pullyvan Krishnamoorthy
Browse files
Options
Downloads
Patches
Plain Diff
add Centos Support for Ldap
parent
2b98aa51
No related branches found
No related tags found
1 merge request
!2
Add centos support for ldap
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tasks/main.yml
+55
-3
55 additions, 3 deletions
tasks/main.yml
with
55 additions
and
3 deletions
tasks/main.yml
+
55
−
3
View file @
a1dac7cc
---
# tasks file for sti_it.ldap_authentication
-
name
:
install required packages
apt
:
apt
:
name
:
"
{{
item
}}"
update_cache
:
yes
state
:
present
...
...
@@ -14,6 +14,34 @@
-
ldap-utils
when
:
ansible_os_family == 'Debian'
-
name
:
install required packages
yum
:
name
:
"
{{
item
}}"
update_cache
:
yes
state
:
present
loop
:
-
authconfig
-
sssd
-
realmd
-
oddjob
-
oddjob-mkhomedir
-
adcli
-
samba-common
-
samba-common-tools
-
openldap-clients
-
policycoreutils-python
-
nfs4-acl-tools
-
nfs-utils
-
libnfsidmap
-
libsss_idmap
-
sssd-winbind-idmap
-
sudo
-
openldap
-
openldap-clients
-
pam_ldap
-
nss-pam-ldapd
when
:
ansible_distribution == "CentOS"
-
name
:
make sure that the CA certs path exists
file
:
path
:
/etc/openldap/cacerts
...
...
@@ -51,6 +79,9 @@
notify
:
-
restart sssd
# - name: ensure that ldap automount is added to nsswitch.conf
# lineinfile:
# line: 'automount: ldap'
...
...
@@ -59,7 +90,7 @@
# notify:
# - restart sssd
-
name
:
generate ldap.conf
-
name
:
generate ldap.conf
for Debian
template
:
src
:
ldap.conf
dest
:
/etc/ldap/ldap.conf
...
...
@@ -67,13 +98,30 @@
group
:
root
notify
:
-
restart sssd
when
:
ansible_os_family == 'Debian'
-
name
:
generate ldap.conf for Centos
template
:
src
:
ldap.conf
dest
:
/etc/openldap/ldap.conf
owner
:
root
group
:
root
notify
:
-
restart sssd
when
:
ansible_distribution == "CentOS"
# As per documentation at https://docs.google.com/document/d/1sfBkcqaGm4M3U6_uqVWSZ1MxKvnH5FK1U4OXr_HDU-w/edit#heading=h.tdhi5uogtedq
# and at https://help.ubuntu.com/community/LDAPClientAuthentication#Automatically_create_home_folders
-
name
:
automate the homedir creation process
-
name
:
automate the homedir creation process
for Debian
template
:
src
:
my_mkhomedir
dest
:
/usr/share/pam-configs/my_mkhomedir
when
:
ansible_os_family == 'Debian'
-
name
:
automate the homedir creation process for CentOS
shell
:
authconfig --enablemkhomedir --update
when
:
ansible_distribution == "CentOS"
-
name
:
activate the creation of the homedir
lineinfile
:
...
...
@@ -82,3 +130,7 @@
insertafter
:
EOF
notify
:
-
restart sssd
when
:
ansible_os_family == 'Debian'
-
name
:
join Ldap Centos
shell
:
authconfig --kickstart --enableshadow --enablemd5 --passalgo=sha512 --enableldap --ldapserver=ldap.epfl.ch --ldapbasedn=o=epfl,c=ch --enableldapauth --enableforcelegacy --enableldaptls --disablefingerprint --updateall
when
:
ansible_distribution == "CentOS"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment