Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

patch_munge #27

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,10 @@ __slurmdbd_config_default:
}}
LogFile: "{{ '/var/log/slurm-llnl/slurmdbd.log' if __slurm_debian else omit }}"
__slurmdbd_config_merged: "{{ __slurmdbd_config_default | combine(slurmdbd_config | default({})) }}"
# Munge
munge_uid: 997
munge_gid: 995
munge_config: "/etc/munge"
munge_lib_path: "/var/lib/munge"
munge_log_path: "/var/log/munge"
munge_run_path: "/var/run/munge"
37 changes: 33 additions & 4 deletions tasks/munge.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,41 @@
---
- name: Ensure group Munge exists
ansible.builtin.group:
name: munge
state: present
gid: "{{ munge_gid }}"

- name: Check munge dir
file:
path: /etc/munge
- name: Create Munge user
ansible.builtin.user:
name: munge
group: munge
uid: "{{ munge_uid }}"
state: present
shell: /usr/sbin/nologin
system: no
createhome: no
home: /nonexistent

- name: Create Munge directories
ansible.builtin.file:
path: "{{ item }}"
owner: munge
group: munge
mode: 0700
state: directory
mode: 0755
with_items:
- "{{ munge_config }}"
- "{{ munge_lib_path }}"
- "{{ munge_log_path }}"
- "{{ munge_run_path }}"

- name: Packages for Munge
ansible.builtin.package:
name:
- munge
tags:
- packages
notify: Restart munge

- name: Install munge key
copy:
Expand Down