Skip to content
Snippets Groups Projects
Commit 8ccaf0e6 authored by Andrii Babarytskyi's avatar Andrii Babarytskyi :bow_and_arrow:
Browse files

Separating U22 and U20 tasks

parent 3364d543
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
---
# 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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment