The /var/log/munge permissions bug is fixed in trusty-updates and newer,

drop the workaround for that.

Also the Ansible copy module properly handles vaulted binary src files
as of 2.4.
This commit is contained in:
Nate Coraor 2019-01-29 21:39:41 -05:00
parent 1efec826c7
commit cd7135bf91
1 changed files with 3 additions and 20 deletions

View File

@ -9,30 +9,13 @@
state: directory state: directory
- name: Install munge key - name: Install munge key
action: copy:
module: decode src: "{{ slurm_munge_key_src }}"
args:
content: "{{ munge_key }}"
dest: /etc/munge/munge.key dest: /etc/munge/munge.key
filter: base64
owner: munge owner: munge
group: munge group: munge
mode: 0400 mode: 0400
when: slurm_munge_key_src is defined
# /var/log on Ubuntu 14.04+ is group writable, which causes munge to refuse to start
# NOTE: This is fixed in munge 0.5.12
- name: Check /var/log permissions
stat:
path: /var/log
register: stat_var_log
when: ansible_distribution == "Ubuntu"
- name: Force munge to start with "insecure" /var/log permissions
lineinfile:
dest: /etc/default/munge
line: 'OPTIONS="--force"'
regexp: ^OPTIONS=
when: ansible_distribution == "Ubuntu" and stat_var_log.stat.wgrp
- name: Ensure Munge is enabled and running - name: Ensure Munge is enabled and running
service: service: