forked from Icinga/ansible-collection-icinga
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/business process module (Icinga#196)
* Add feature to enable business process module and copy existing configuration to the module * add molecule testing for business process module * add documentation and changelog
- Loading branch information
1 parent
7314e49
commit 0249677
Showing
6 changed files
with
89 additions
and
0 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
changelogs/fragments/feature_add_businessprocess_module_installation.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
major_changes: | ||
- Added Installation of Business Process Modeling Module |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
## Module Icinga Business Process Modeling | ||
|
||
The module Icinga Business Process Modeling provides a visualization for hierarchical business processes based on objects monitored by Icinga. | ||
|
||
## Configuration | ||
|
||
The general module parameter like `enabled` and `source` can be applied here. | ||
|
||
For every config file, create a dictionary with sections as keys and the parameters as values. For all parameters please check the [module documentation](https://icinga.com/docs/icinga-business-process-modeling/latest/doc/01-About/) | ||
|
||
|
||
|
||
Example: | ||
``` | ||
icingaweb2_modules: | ||
businessprocess: | ||
enabled: true | ||
source: package | ||
``` | ||
|
||
### Custom Process Files: | ||
|
||
Custom process files are a great way to transfer existing business process configurations into the Business Process Modeling Module. | ||
|
||
To copy existing processes into the processes folder please use the `custom_process_files` dictionary. | ||
|
||
The `src_path` will search within any `files/` directory in the Ansible environment. | ||
``` | ||
icingaweb2_modules: | ||
businessprocess: | ||
enabled: true | ||
source: package | ||
custom_process_files: | ||
- name: test.conf | ||
src_path: processes/test.conf | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
### Business Process Config File ### | ||
# | ||
# Title : test | ||
# Description : test | ||
# Owner : icinga | ||
# AddToMenu : yes | ||
# Statetype : soft | ||
# | ||
################################### | ||
|
||
test2 = | ||
display 1;test2;test2 | ||
webserver = | ||
display 1;webserver;webserver |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
- name: Module Icinga Business Process Modeling | Ensure config directory | ||
ansible.builtin.file: | ||
state: directory | ||
dest: "{{ icingaweb2_modules_config_dir }}/{{ item.key }}" | ||
owner: "{{ icingaweb2_httpd_user }}" | ||
group: "{{ icingaweb2_group }}" | ||
mode: "2770" | ||
|
||
- name: Module Icinga Business Process Modeling | Ensure processes directory | ||
ansible.builtin.file: | ||
state: directory | ||
dest: "{{ icingaweb2_modules_config_dir }}/{{ item.key }}/processes" | ||
owner: "{{ icingaweb2_httpd_user }}" | ||
group: "{{ icingaweb2_group }}" | ||
mode: "2770" | ||
|
||
- name: Module Icinga Business Process Modeling | Copy Process | ||
ansible.builtin.copy: | ||
owner: "{{ icingaweb2_httpd_user }}" | ||
group: "{{ icingaweb2_group }}" | ||
src: "files/{{ _file.src_path }}" | ||
dest: "{{ icingaweb2_modules_config_dir }}/{{ item.key }}/processes/{{ _file.name }}" | ||
when: vars['icingaweb2_modules'][_module]['custom_process_files'] is defined | ||
loop: "{{ vars['icingaweb2_modules'][_module]['custom_process_files'] }}" | ||
loop_control: | ||
loop_var: _file | ||
vars: | ||
_module: "{{ item.key }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters