Add /root/.forward file
This check will check windmill_root_users, if they have an email address, include them in root user forward file for external notifications. Change-Id: Ib27b6d23823b477664c413915bf3d5dcf0908294 Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
parent
f76efd0829
commit
216a94bbea
|
@ -61,3 +61,12 @@
|
|||
copy:
|
||||
content: "%{{ __windmill_users_sudo_group }} ALL=(ALL) NOPASSWD: ALL"
|
||||
dest: /etc/sudoers.d/sudo
|
||||
|
||||
- name: Setup root user forward file
|
||||
become: true
|
||||
template:
|
||||
dest: /root/.forward
|
||||
group: root
|
||||
mode: 0644
|
||||
owner: root
|
||||
src: root/.forward.j2
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
# This file is generated by Ansible
|
||||
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
|
||||
#
|
||||
{% set _root_users = [] %}
|
||||
{% for item in windmill_root_users %}
|
||||
{% if 'email' in windmill_users[item] %}{{ _root_users.append(windmill_users[item].email) }}{% endif %}
|
||||
{% endfor %}
|
||||
{{ _root_users|join(', ') }}
|
Loading…
Reference in New Issue