-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Kahu Anderson
committed
Jan 19, 2024
1 parent
19940f1
commit 7722bc6
Showing
5 changed files
with
103 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
- hosts: localhost | ||
- hosts: servicesnode | ||
vars: | ||
terraform_workspace: default | ||
tasks: | ||
- name: Destroy Kubernetes cluster | ||
shell: >- | ||
kubectl delete cluster {{ terraform_workspace }} | ||
when: | ||
- (operation == "destroy") | ||
- "enable_k8s_openondemand|default(false)|bool == true" | ||
register: destroy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- | ||
- name: Full system upgrade | ||
apt: | ||
update_cache: yes | ||
cache_valid_time: 3600 | ||
upgrade: dist | ||
|
||
- name: Install LDAP client packages | ||
apt: | ||
name: | ||
- libpam-ldap | ||
- ldap-utils | ||
- nscd | ||
- nslcd | ||
- libnss-ldapd | ||
state: present | ||
|
||
- name: Configure nslcd uri | ||
lineinfile: | ||
path: /etc/nslcd.conf | ||
regexp: '^uri' | ||
line: 'uri ldap://{{ hostvars["servicesnode"]["ansible_default_ipv4"]["address"] }}/' | ||
notify: restart nslcd | ||
|
||
- name: Configure basedn | ||
lineinfile: | ||
path: /etc/nslcd.conf | ||
regexp: '^base' | ||
line: 'base {{ ldap_base_dn }}' | ||
notify: restart nslcd | ||
|
||
- name: Configure passwd in nsswitch.conf | ||
lineinfile: | ||
path: /etc/nsswitch.conf | ||
regexp: '^passwd:' | ||
line: 'passwd: files systemd ldap' | ||
|
||
- name: Configure group in nsswitch.conf | ||
lineinfile: | ||
path: /etc/nsswitch.conf | ||
regexp: '^group:' | ||
line: 'group: files systemd ldap' | ||
|
||
- name: Configure common-password | ||
replace: | ||
path: /etc/pam.d/common-password | ||
regexp: '(use_authtok\s*)' | ||
replace: '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,6 @@ | ||
--- | ||
- name: Full system upgrade | ||
apt: | ||
update_cache: yes | ||
cache_valid_time: 3600 | ||
upgrade: dist | ||
|
||
- name: Install LDAP client packages | ||
apt: | ||
name: | ||
- libpam-ldap | ||
- ldap-utils | ||
- nscd | ||
- nslcd | ||
- libnss-ldapd | ||
state: present | ||
- import_tasks: debian.yml | ||
when: ansible_os_family == "Debian" | ||
|
||
- name: Configure nslcd uri | ||
lineinfile: | ||
path: /etc/nslcd.conf | ||
regexp: '^uri' | ||
line: 'uri ldap://servicesnode.flexi.nesi/' | ||
notify: restart nslcd | ||
|
||
- name: Configure basedn | ||
lineinfile: | ||
path: /etc/nslcd.conf | ||
regexp: '^base' | ||
line: 'base {{ ldap_base_dn }}' | ||
notify: restart nslcd | ||
|
||
- name: Configure passwd in nsswitch.conf | ||
lineinfile: | ||
path: /etc/nsswitch.conf | ||
regexp: '^passwd:' | ||
line: 'passwd: files systemd ldap' | ||
|
||
- name: Configure group in nsswitch.conf | ||
lineinfile: | ||
path: /etc/nsswitch.conf | ||
regexp: '^group:' | ||
line: 'group: files systemd ldap' | ||
|
||
- name: Configure common-password | ||
replace: | ||
path: /etc/pam.d/common-password | ||
regexp: '(use_authtok\s*)' | ||
replace: '' | ||
- import_tasks: redhat.yml | ||
when: ansible_os_family == "RedHat" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- | ||
- name: Full system upgrade | ||
dnf: | ||
update_cache: yes | ||
cache_valid_time: 3600 | ||
upgrade: dist | ||
|
||
- name: Install LDAP client packages | ||
dnf: | ||
name: | ||
- libpam-ldap | ||
- ldap-utils | ||
- nscd | ||
- nslcd | ||
- libnss-ldapd | ||
state: present | ||
|
||
- name: Configure nslcd uri | ||
lineinfile: | ||
path: /etc/nslcd.conf | ||
regexp: '^uri' | ||
line: 'uri ldap://{{ hostvars["servicesnode"]["ansible_default_ipv4"]["address"] }}/' | ||
notify: restart nslcd | ||
|
||
- name: Configure basedn | ||
lineinfile: | ||
path: /etc/nslcd.conf | ||
regexp: '^base' | ||
line: 'base {{ ldap_base_dn }}' | ||
notify: restart nslcd | ||
|
||
- name: Configure passwd in nsswitch.conf | ||
lineinfile: | ||
path: /etc/nsswitch.conf | ||
regexp: '^passwd:' | ||
line: 'passwd: files systemd ldap' | ||
|
||
- name: Configure group in nsswitch.conf | ||
lineinfile: | ||
path: /etc/nsswitch.conf | ||
regexp: '^group:' | ||
line: 'group: files systemd ldap' | ||
|
||
- name: Configure common-password | ||
replace: | ||
path: /etc/pam.d/common-password | ||
regexp: '(use_authtok\s*)' | ||
replace: '' |