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.
- Loading branch information
1 parent
0249677
commit 765bf30
Showing
5 changed files
with
91 additions
and
1 deletion.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
changelogs/fragments/feature_add_vspheredb_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 Vspheredb 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,55 @@ | ||
## Module Vspheredb | ||
|
||
The module Icinga Vspheredb provides | ||
|
||
## 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-vsphere-integration/latest/doc/01-Installation/) | ||
|
||
as Icinga Web 2 resource, please use the `icingaweb2_resources` variable to define | ||
the resource. | ||
|
||
Example: | ||
|
||
``` | ||
icingaweb2_resources: | ||
vspheredb: | ||
type: db | ||
db: mysql | ||
host: localhost | ||
dbname: vspheredb | ||
username: vspheredb | ||
password: vspheredb | ||
charset: utf8mb4 | ||
icingaweb2_modules: | ||
vspheredb: | ||
enabled: true | ||
source: package | ||
config: | ||
db: | ||
resource: vspheredb | ||
``` | ||
|
||
## Database | ||
|
||
The database can be created using the Geerlingguy mysql role. | ||
|
||
For more parameters please check the [role documentation](https://github.com/geerlingguy/ansible-role-mysql) | ||
|
||
Example: | ||
|
||
``` | ||
mysql_databases: | ||
- name: vspheredb | ||
encoding: utf8mb4 | ||
collation: utf8mb4_general_ci | ||
pre_tasks: | ||
- ansible.builtin.include_role: | ||
name: geerlingguy.mysql | ||
``` |
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,30 @@ | ||
- name: Module Vspheredb | Install | ||
debug: | ||
msg: Installed VsphereDB Modul | ||
|
||
|
||
|
||
- name: Module Vspheredb | Ensure config directory | ||
ansible.builtin.file: | ||
state: directory | ||
dest: "{{ icingaweb2_modules_config_dir }}/vspheredb" | ||
owner: "{{ icingaweb2_httpd_user }}" | ||
group: "{{ icingaweb2_group }}" | ||
mode: "2770" | ||
|
||
- name: Module Vspheredb | Manage config files | ||
ansible.builtin.include_tasks: manage_module_config.yml | ||
loop: "{{ _files }}" | ||
loop_control: | ||
loop_var: _file | ||
when: vars['icingaweb2_modules'][_module][_file] is defined | ||
vars: | ||
_module: "{{ item.key }}" | ||
_files: | ||
- config | ||
|
||
- name: Module Vspheredb | Ensure daemon is running | ||
ansible.builtin.service: | ||
name: "{{ icingaweb2_vspheredb_service }}" | ||
state: started | ||
enabled: yes |
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