nextcloud: Entferne Munin-Konfiguration. Das Plugin bietet keinen wirklichen Mehrwert
This commit is contained in:
parent
c36988a0be
commit
c2311313f2
1 changed files with 0 additions and 45 deletions
|
@ -1,45 +0,0 @@
|
|||
---
|
||||
- name: "munin | Verlinke Plugin"
|
||||
file:
|
||||
src: "{{ local_munin_path }}/nextcloud_"
|
||||
dest: "/etc/munin/plugins/nextcloud_{{ instance.domain }}"
|
||||
state: link
|
||||
notify: restart munin-node
|
||||
|
||||
- name: "userinfo"
|
||||
command:
|
||||
cmd: 'php occ user:info munin'
|
||||
chdir: "{{ nextcloud_root }}/{{ instance.domain }}"
|
||||
become: true
|
||||
become_user: "{{ instance.user }}"
|
||||
ignore_errors: true
|
||||
changed_when: false
|
||||
register: occ_user
|
||||
|
||||
- name: "munin | Erstelle Nutzer"
|
||||
command:
|
||||
cmd: 'php occ user:add --display-name="munin" --password-from-env munin'
|
||||
chdir: "{{ nextcloud_root }}/{{ instance.domain }}"
|
||||
environment:
|
||||
OC_PASS: "{{ nextcloud_munin_user_password }}"
|
||||
become: true
|
||||
become_user: "{{ instance.user }}"
|
||||
register: occ_user_created
|
||||
when: occ_user.stdout == "user not found"
|
||||
|
||||
- name: "munin | Kopiere Konfiguration"
|
||||
blockinfile:
|
||||
path: /etc/munin/plugin-conf.d/nextcloud
|
||||
create: true
|
||||
mode: 0600
|
||||
marker_begin: "{{ instance.domain }}"
|
||||
block: |
|
||||
[{{ instance.domain }}]
|
||||
env.username munin
|
||||
env.password {{ nextcloud_munin_user_password }}
|
||||
env.api_path /ocs/v2.php/apps/serverinfo/api/v1/info
|
||||
env.scheme https
|
||||
env.timeout 2s
|
||||
env.updates_warning 1
|
||||
when: occ_user_created.changed
|
||||
notify: restart munin-node
|
Loading…
Reference in a new issue