forked from mhakala/ansible-role-pam
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from AaltoSciComp/pam_slurm_adopt
Add support for newer slurm pam module
- Loading branch information
Showing
6 changed files
with
109 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
******* | ||
Docker driver installation guide | ||
******* | ||
|
||
Requirements | ||
============ | ||
|
||
* Docker Engine | ||
|
||
Install | ||
======= | ||
|
||
Please refer to the `Virtual environment`_ documentation for installation best | ||
practices. If not using a virtual environment, please consider passing the | ||
widely recommended `'--user' flag`_ when invoking ``pip``. | ||
|
||
.. _Virtual environment: https://virtualenv.pypa.io/en/latest/ | ||
.. _'--user' flag: https://packaging.python.org/tutorials/installing-packages/#installing-to-the-user-site | ||
|
||
.. code-block:: bash | ||
$ python3 -m pip install 'molecule[docker]' |
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,8 @@ | ||
--- | ||
- name: Converge | ||
hosts: all | ||
become: True | ||
tasks: | ||
- name: "Include ansible-role-pam" | ||
include_role: | ||
name: "ansible-role-pam" |
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,35 @@ | ||
--- | ||
dependency: | ||
name: galaxy | ||
driver: | ||
name: docker | ||
platforms: | ||
- name: noslurm | ||
image: docker.io/pycontribs/centos:8 | ||
pre_build_image: true | ||
groups: | ||
- pam | ||
- name: pam-slurm | ||
image: docker.io/pycontribs/centos:8 | ||
pre_build_image: true | ||
groups: | ||
- pam | ||
- pam_slurm | ||
- name: pam-slurm-adopt | ||
image: docker.io/pycontribs/centos:8 | ||
pre_build_image: true | ||
groups: | ||
- pam | ||
- pam_slurm_adopt | ||
provisioner: | ||
name: ansible | ||
inventory: | ||
group_vars: | ||
pam: | ||
pam_enabled: True | ||
pam_slurm: | ||
pam_enable_slurm: True | ||
pam_slurm_adopt: | ||
pam_enable_slurm_adopt: True | ||
verifier: | ||
name: ansible |
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,34 @@ | ||
--- | ||
- name: Verify pam enabled | ||
hosts: all | ||
tasks: | ||
#- command: cat /etc/pam.d/system-auth | ||
# register: catcmd | ||
#- debug: | ||
# var: catcmd.stdout_lines | ||
- name: Check whether /etc/pam.d/system-auth is populated | ||
command: 'grep "#%PAM-1.0" /etc/pam.d/system-auth' | ||
|
||
- name: No slurm pam tests | ||
hosts: noslurm | ||
tasks: | ||
- name: Check that localuser.so is in /etc/pam.d/system-auth | ||
command: 'grep "account sufficient pam_localuser.so" /etc/pam.d/system-auth' | ||
- name: Check that slurm is not mentioned in /etc/pam.d/system-auth | ||
command: 'grep -v slurm /etc/pam.d/system-auth' | ||
|
||
- name: Slurm pam tests | ||
hosts: pam-slurm | ||
tasks: | ||
- name: Check that localuser.so is in /etc/pam.d/system-auth | ||
command: 'grep "account sufficient pam_localuser.so" /etc/pam.d/system-auth' | ||
- name: Check pam_slurm.so is in /etc/pam.d/system-auth | ||
command: 'grep "account required pam_slurm.so" /etc/pam.d/system-auth' | ||
|
||
- name: Slurm adopt pam tests | ||
hosts: pam-slurm-adopt | ||
tasks: | ||
- name: Check that localuser.so is not in /etc/pam.d/system-auth | ||
command: 'grep -v "account sufficient pam_localuser.so" /etc/pam.d/system-auth' | ||
- name: Check pam_slurm_adopt.so is in /etc/pam.d/system-auth | ||
command: 'grep "\-account sufficient pam_slurm_adopt.so action_adopt_failure=deny action_generic_failure=deny" /etc/pam.d/system-auth' |
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