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
8ccaf0e6
"git@gitlab.epfl.ch:si-idevfsd/canap.git" did not exist on "f08791de0ea2231781778a9880757c835e79b401"
Commit
8ccaf0e6
authored
2 years ago
by
Andrii Babarytskyi
Browse files
Options
Downloads
Patches
Plain Diff
Separating U22 and U20 tasks
parent
3364d543
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tasks/main.yml
+1
-2
1 addition, 2 deletions
tasks/main.yml
tasks/ubuntu2204.yml
+87
-0
87 additions, 0 deletions
tasks/ubuntu2204.yml
with
88 additions
and
2 deletions
tasks/main.yml
+
1
−
2
View file @
8ccaf0e6
...
...
@@ -6,8 +6,7 @@
-
include
:
ubuntu2004.yml tags=debian
when
:
ansible_distribution == "Ubuntu" and ansible_distribution_major_version == "20"
# 2004 code tested and seems to work for ubuntu 22.04
-
include
:
ubuntu2004.yml tags=debian
-
include
:
ubuntu2204.yml tags=debian
when
:
ansible_distribution == "Ubuntu" and ansible_distribution_major_version == "22"
-
include
:
debian11.yml tags=debian
...
...
This diff is collapsed.
Click to expand it.
tasks/ubuntu2204.yml
0 → 100644
+
87
−
0
View file @
8ccaf0e6
---
# tasks file for sti_it.ldap_authentication
-
name
:
install required packages
apt
:
name
:
"
{{
item
}}"
update_cache
:
yes
state
:
present
loop
:
-
sssd
-
libpam-sss
-
libnss-sss
-
sssd-tools
-
autofs-ldap
-
ldap-utils
-
name
:
make sure that the CA certs path exists
file
:
path
:
/etc/openldap/cacerts
state
:
directory
-
name
:
download Digicert intermediate certificate
get_url
:
dest
:
/etc/openldap/cacerts/digicert.pem
url
:
https://rauth.epfl.ch/Digicert_TLS_RSA_SHA256_2020_CA1.pem
-
name
:
generate sssd.conf
template
:
src
:
sssd2004.conf
dest
:
/etc/sssd/sssd.conf
owner
:
root
group
:
root
mode
:
0600
notify
:
-
restart sssd
# - name: generate autofs.conf
# template:
# src: autofs.conf
# dest: /etc/autofs.conf
# owner: root
# group: root
# notify:
# - restart sssd
-
name
:
replace nis by ldap in /etc/nsswitch.conf
replace
:
path
:
/etc/nsswitch.conf
regexp
:
'
nis'
replace
:
'
ldap'
notify
:
-
restart sssd
# - name: ensure that ldap automount is added to nsswitch.conf
# lineinfile:
# line: 'automount: ldap'
# path: /etc/nsswitch.conf
# insertafter: EOF
# notify:
# - restart sssd
-
name
:
generate ldap.conf for Debian
template
:
src
:
ldap.conf
dest
:
/etc/ldap/ldap.conf
owner
:
root
group
:
root
notify
:
-
restart sssd
# 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 for Debian
template
:
src
:
my_mkhomedir
dest
:
/usr/share/pam-configs/my_mkhomedir
-
name
:
activate the creation of the homedir
lineinfile
:
line
:
'
session
required
pam_mkhomedir.so
umask=0022
skel=/etc/skel'
path
:
/etc/pam.d/common-session
insertafter
:
EOF
notify
:
-
restart sssd
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