Skip to content

Commit

Permalink
Merge branch 'main' into molecule_workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
adf-patrickha committed Jan 6, 2025
2 parents 3e40136 + b774c60 commit 0dfd362
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 11 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/delete_galaxy_role.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: Delete role from Ansible Galaxy

# configure manual trigger
on:
workflow_dispatch:

jobs:
delete:
uses: adfinis/github-workflows-bareos/.github/workflows/[email protected]
secrets: inherit
2 changes: 1 addition & 1 deletion .github/workflows/galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ on:

jobs:
release:
uses: adfinis/github-workflows-bareos/.github/workflows/ansible-role.yaml@v0.1.1
uses: adfinis/github-workflows-bareos/.github/workflows/ansible-galaxy-role-release.yaml@v0.5.0
secrets: inherit
3 changes: 2 additions & 1 deletion meta/argument_specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,8 @@ argument_specs:
choices:
- "ldap"
- "unix"
description: "Decide if Unix or LDAP socket should be used for PAM authentication"
- "sss"
description: "Decide if Unix, SSS or LDAP socket should be used for PAM authentication"
bareos_dir_pam_auth_profile:
type: "str"
default: "webui-admin"
Expand Down
8 changes: 0 additions & 8 deletions tasks/pam_auth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,6 @@
- bareos_dir_pam_auth_method == "unix"
- ansible_facts.os_family == "RedHat"

- name: pam_auth | Download pam_exec_add_bareos_user.py from bareos Github
ansible.builtin.get_url:
url: https://github.com/bareos/bareos/blob/master/contrib/misc/bareos_pam_integration/pam_exec_add_bareos_user.py
dest: "/usr/local/bin/pam_exec_add_bareos_user.py"
owner: bareos
group: bareos
mode: "0744"

- name: pam_auth | Create PAM specific Bareos Console
ansible.builtin.template:
src: console.conf.j2
Expand Down
5 changes: 4 additions & 1 deletion templates/pam.d/bareos.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@ account requisite pam_unix.so
{% elif bareos_dir_pam_auth_method == "ldap" %}
auth required pam_ldap.so
account requisite pam_ldap.so
{% elif bareos_dir_pam_auth_method == "sss" %}
auth optional pam_unix.so
auth required pam_sss.so use_first_pass
account requisite pam_sss.so
{% endif %}
account [default=ignore] pam_exec.so /usr/bin/python3 /usr/local/bin/pam_exec_add_bareos_user.py --name {{ bareos_dir_pam_auth_username | default('pam-adduser') }} --password {{ bareos_dir_pam_auth_password }} --profile {{ bareos_dir_pam_auth_profile | default("webui-admin") }}

0 comments on commit 0dfd362

Please sign in to comment.