Update to 2022-01-03 17:00

This commit is contained in:
Daniel Berteaud 2022-01-03 17:00:09 +01:00
parent 5ff03544ad
commit 5488e2468c
3 changed files with 19 additions and 2 deletions

View File

@ -1,5 +1,6 @@
---
# Homeserver to connect to (without https://)
# patrix_server:
#
#
@ -11,6 +12,11 @@
#
# patrix_token:
#
# Default room where messages will be sent
# patrix_room:
#
# If true, patrix will be updated to the latest version available
# Else, ansible will just check if it's installed
patrix_update: False
...

View File

@ -1,5 +1,9 @@
---
- name: Install patrix
yum: name=patrix
yum:
name:
- patrix
- acl
state: "{{ patrix_update | ternary('latest', 'present') }}"
tags: patrix

View File

@ -3,7 +3,14 @@
- include: install_{{ ansible_os_family }}.yml
- name: Deploy patrix config for root user
template: src=patrixrc.j2 dest=/root/.patrixrc mode='600'
template: src=patrixrc.j2 dest=/etc/patrixrc mode='600'
tags: patrix
- name: Set ACL on patrixrc config
shell: |
setfacl -b /etc/patrixrc
setfacl -m {% for group in system_admin_groups %}g:{{ group }}:r{{ ',' if not loop.last }}{% endfor %} /etc/patrixrc
when: system_admin_groups is defined and system_admin_groups | length > 0
changed_when: False
tags: patrix
...