Skip to content

Commit

Permalink
Adds docs for installation from source
Browse files Browse the repository at this point in the history
  • Loading branch information
mocdaniel committed Nov 22, 2023
1 parent fc19a33 commit 5dd6997
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 13 deletions.
2 changes: 1 addition & 1 deletion doc/role-icingaweb2/module-monitoring.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The module Monitoring is the main module for the deprecated IDO backend.

## Configuration

The general module parameter `enabled` be applied here.
The general module parameters like `enabled` 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-web/latest/doc/03-Configuration/#configuration)

Expand Down
7 changes: 1 addition & 6 deletions doc/role-icingaweb2/module-x509.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@

### Variables and Configuration

The general module parameter like `enabled` and `source` can be applied here.

| Variable | Value |
|----------|------------|
| enabled | true/false |
| source | package |
The general module parameters like `enabled` and `source` can be applied here.

#### Section configuration

Expand Down
22 changes: 22 additions & 0 deletions doc/role-icingaweb2/role-icingaweb2.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,28 @@ The role icingaweb2 installs and configures Icinga Web 2 and its modules.

Icingaweb2 and some of its modules rely on a relational database to persist data. These databases **won't** be created by this role - you need to deploy and configure them in advance. For more information, see the [Databases](../getting-started.md#databases) section in the getting started guide.

## Modules

All modules get configured as child objects of the `icingaweb2_modules` variable. All modules can be installed **from source** by setting `source: git`. By default, this role installs the module from the official Icinga repositories, if available. When installing from source, the **latest tagged release** from GitHub will be installed.

The following example displays different module configurations:

> [!WARNING]
> Most configuration per module has been **omitted** for brevity, please see the respective module configuration docs
```yaml
icingaweb2_modules:
icingadb:
enabled: true
source: package # install package from the official repos
director:
enabled: true
source: package
reporting:
enabled: true
source: git # install from source due to lack of package
```
## Variables
### Icinga Web 2 DB Configuration
Expand Down
6 changes: 0 additions & 6 deletions roles/icingaweb2/tasks/modules/director.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,3 @@
ansible.builtin.shell:
cmd: icingacli director kickstart run
when: vars['icingaweb2_modules']['director']['run_kickstart'] is defined and vars['icingaweb2_modules']['director']['run_kickstart'] and vars['icingaweb2_modules']['director']['kickstart'] is defined and _required.rc|int == 0

- name: Module Director | Ensure daemon is running
ansible.builtin.service:
name: "{{ icingaweb2_director_service }}"
state: started
enabled: yes
10 changes: 10 additions & 0 deletions roles/icingaweb2/tasks/modules/x509.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,13 @@
_module: "{{ item.key }}"
when: vars['icingaweb2_modules'][_module]['certificate_files'] is defined
changed_when: false

- name: Module x509 | Ensure daemon service file is present
ansible.builtin.copy:
src: "{{ icingaweb2_config.global.module_path }}/x509/config/systemd/icinga-x509.service"
dest: /etc/systemd/system/icinga-x509.service
mode: "0644"
owner: root
group: root
remote_src: yes
when: icingaweb2_modules['x509']['source'] == 'git'

0 comments on commit 5dd6997

Please sign in to comment.