Skip to content

Commit

Permalink
move alma pwauth install in role
Browse files Browse the repository at this point in the history
  • Loading branch information
xpillons committed Apr 4, 2024
1 parent affc164 commit 3e45b92
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 30 deletions.
12 changes: 0 additions & 12 deletions playbooks/ood.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@
when:
- ansible_distribution == 'CentOS'
- ansible_distribution_major_version == '7'


when:
- authentication.httpd_auth is defined
- authentication.httpd_auth == 'basic'
Expand All @@ -70,16 +68,6 @@
- name: Set up PAM authentication for OOD
include_role:
name: ood_pam_auth
when:
- ((ansible_distribution == 'CentOS') and (ansible_distribution_major_version == '7')) or (ansible_distribution == 'Ubuntu')

- name: Set up mod_authnz_external modules (for cyclecloud proxy)
yum:
name: mod_authnz_external,pwauth
lock_timeout: 180
when:
- ansible_distribution == 'AlmaLinux'
- ansible_distribution_major_version == '8'

- name: Retrieve OIDC secret
block:
Expand Down
21 changes: 3 additions & 18 deletions playbooks/roles/ood_pam_auth/tasks/AlmaLinux/8.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,6 @@
---

- name: Install mod_authnz_pam
- name: Set up mod_authnz_external modules (for cyclecloud proxy)
yum:
name: mod_authnz_pam
state: latest
lock_timeout : 180

- name: Add LoadModule line to 55-authnz_pam.conf
ansible.builtin.lineinfile:
path: /etc/httpd/conf.modules.d/55-authnz_pam.conf
search_string: 'LoadModule authnz_pam_module'
line: LoadModule authnz_pam_module modules/mod_authnz_pam.so

- name: Set up PAM authentication
shell: |
cp /etc/pam.d/sshd /etc/pam.d/ood
chmod 640 /etc/shadow
chgrp apache /etc/shadow
args:
creates: /etc/pam.d/ood
name: mod_authnz_external,pwauth
lock_timeout: 180

0 comments on commit 3e45b92

Please sign in to comment.