Skip to content

Commit 0249677

Browse files
Feature/business process module (#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
1 parent 7314e49 commit 0249677

File tree

6 files changed

+89
-0
lines changed

6 files changed

+89
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
major_changes:
3+
- Added Installation of Business Process Modeling Module
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
## Module Icinga Business Process Modeling
2+
3+
The module Icinga Business Process Modeling provides a visualization for hierarchical business processes based on objects monitored by Icinga.
4+
5+
## Configuration
6+
7+
The general module parameter like `enabled` and `source` can be applied here.
8+
9+
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/)
10+
11+
12+
13+
Example:
14+
```
15+
icingaweb2_modules:
16+
businessprocess:
17+
enabled: true
18+
source: package
19+
```
20+
21+
### Custom Process Files:
22+
23+
Custom process files are a great way to transfer existing business process configurations into the Business Process Modeling Module.
24+
25+
To copy existing processes into the processes folder please use the `custom_process_files` dictionary.
26+
27+
The `src_path` will search within any `files/` directory in the Ansible environment.
28+
```
29+
icingaweb2_modules:
30+
businessprocess:
31+
enabled: true
32+
source: package
33+
custom_process_files:
34+
- name: test.conf
35+
src_path: processes/test.conf
36+
```

molecule/default/converge.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,13 @@
7171
- zones.d/main/commands
7272
- zones.d/main/hosts
7373
- zones.d/main/services
74+
icingaweb2_modules:
75+
businessprocess:
76+
enabled: true
77+
source: package
78+
custom_process_files:
79+
- name: test.conf
80+
src_path: test.conf
7481
collections:
7582
- icinga.icinga
7683
pre_tasks:

molecule/default/files/test.conf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
### Business Process Config File ###
2+
#
3+
# Title : test
4+
# Description : test
5+
# Owner : icinga
6+
# AddToMenu : yes
7+
# Statetype : soft
8+
#
9+
###################################
10+
11+
test2 =
12+
display 1;test2;test2
13+
webserver =
14+
display 1;webserver;webserver
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
- name: Module Icinga Business Process Modeling | Ensure config directory
2+
ansible.builtin.file:
3+
state: directory
4+
dest: "{{ icingaweb2_modules_config_dir }}/{{ item.key }}"
5+
owner: "{{ icingaweb2_httpd_user }}"
6+
group: "{{ icingaweb2_group }}"
7+
mode: "2770"
8+
9+
- name: Module Icinga Business Process Modeling | Ensure processes directory
10+
ansible.builtin.file:
11+
state: directory
12+
dest: "{{ icingaweb2_modules_config_dir }}/{{ item.key }}/processes"
13+
owner: "{{ icingaweb2_httpd_user }}"
14+
group: "{{ icingaweb2_group }}"
15+
mode: "2770"
16+
17+
- name: Module Icinga Business Process Modeling | Copy Process
18+
ansible.builtin.copy:
19+
owner: "{{ icingaweb2_httpd_user }}"
20+
group: "{{ icingaweb2_group }}"
21+
src: "files/{{ _file.src_path }}"
22+
dest: "{{ icingaweb2_modules_config_dir }}/{{ item.key }}/processes/{{ _file.name }}"
23+
when: vars['icingaweb2_modules'][_module]['custom_process_files'] is defined
24+
loop: "{{ vars['icingaweb2_modules'][_module]['custom_process_files'] }}"
25+
loop_control:
26+
loop_var: _file
27+
vars:
28+
_module: "{{ item.key }}"

roles/icingaweb2/vars/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
icingaweb2_module_packages:
33
icingadb: icingadb-web
44
director: icinga-director
5+
businessprocess: icinga-businessprocess

0 commit comments

Comments
 (0)