-
Notifications
You must be signed in to change notification settings - Fork 40
refacto: add fqdn, argspecs and clean task names #380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
lutin-malin
wants to merge
2
commits into
NETWAYS:main
Choose a base branch
from
lutin-malin:refacto/argspecs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Empty file.
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,149 @@ | ||||||
--- | ||||||
argument_specs: | ||||||
main: | ||||||
short_description: configure or manage Icinga 2 server and agents | ||||||
description: | ||||||
- Role to install, configure or manage Icinga 2 server and agents. | ||||||
author: | | ||||||
- Lennart Betz <[email protected]> | ||||||
- Thilo Wening <[email protected]> | ||||||
- Thomas Widhalm <[email protected]> | ||||||
options: | ||||||
icinga2_packages: | ||||||
description: list of packages to be installed | ||||||
type: list | ||||||
elements: str | ||||||
default: ["icinga2"] | ||||||
icinga2_packages_dependencies: | ||||||
description: | ||||||
- list of packages dependancies to be installed in addition to packages | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
- OS Specific | ||||||
type: list | ||||||
elements: str | ||||||
ansible_selinux: # naming is wrong, should be prefixed with the role name, e.g. icinga2_selinux | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You are right regarding this variable name |
||||||
description: | ||||||
- The Icinga 2 role will automatically detect via Ansible facts if SELinux is enabled on the system. | ||||||
- If this is the case the package icinga2-selinux will be automatically installed. | ||||||
- If the package should be installed, even if SELinux is not enabled or somehow wrongly disabled in Ansible use the following variable. | ||||||
type: dict | ||||||
options: | ||||||
status: | ||||||
description: Force installation of package `icinga2-selinux` | ||||||
type: str | ||||||
choices: | ||||||
- enabled | ||||||
- disabled | ||||||
icinga2_fragments_path: | ||||||
description: Base installation folder of all icinga content | ||||||
default: /var/tmp/icinga | ||||||
icinga2_config_path: | ||||||
description: folderpath for icinga configuration | ||||||
default: /etc/icinga2 | ||||||
icinga2_user: | ||||||
description: local icinga2 user | ||||||
icinga2_group: | ||||||
description: local group for O(icinga2_user) | ||||||
icinga2_constants: | ||||||
description: | ||||||
- Define constants in **constants.conf**. | ||||||
- usefull to define the O(icinga2_constants.NodeName) and O(icinga2_constants.ZoneName) | ||||||
- usefull to define the salt | ||||||
type: dict | ||||||
options: | ||||||
PluginDir: | ||||||
description: the plugin folderpath | ||||||
default: /usr/lib/nagios/plugins | ||||||
ManubulonPluginDir: | ||||||
description: manabulon plugin folderpath | ||||||
default: /usr/lib/nagios/plugins | ||||||
PluginContribDir: | ||||||
description: contrib plugins folderpath | ||||||
default: /usr/lib/nagios/plugins | ||||||
NodeName: | ||||||
description: > | ||||||
- node name | ||||||
- ex: satellite.localdomain | ||||||
default: ansible_fqdn | ||||||
ZoneName: | ||||||
description: > | ||||||
- NodeName | ||||||
- ex: zone-satellite-d1 | ||||||
default: NodeName | ||||||
TicketSalt: | ||||||
description: salt | ||||||
default: '' | ||||||
icinga2_features: | ||||||
description: | ||||||
- List of features and their configuration settings to be set | ||||||
- Each feature has its own attributes | ||||||
- Check L(Documentation Icinga 2 Features,https://icinga.com/docs/icinga-2/latest/doc/09-object-types/#features) | ||||||
type: list | ||||||
elements: dict | ||||||
default: >- | ||||||
- name: checker | ||||||
- name: notification | ||||||
- name: mainlog | ||||||
icinga2_config_host: | ||||||
description: hostname of the configuration | ||||||
default: ansible_fqdn | ||||||
icinga2_confd: | ||||||
description: | ||||||
- If the local **conf.d** directory shouldn't be recursively included then the var O(icinga2_confd) should be set to `false`. | ||||||
- >- | ||||||
Otherwise you can use a directory name to set the include to a different folder | ||||||
than **conf.d**. The folder needs to exist below /etc/icinga2. If it should be created by the role use the variable O(icinga2_config_directories) in addition. | ||||||
type: str | ||||||
|
||||||
icinga2_config_directories: | ||||||
description: | ||||||
- List of configuration directories to be created | ||||||
- Those directories are only managed when they are part of `zones.d`, `conf.d` or the variable O(icinga2_confd). | ||||||
type: list | ||||||
elements: str | ||||||
default: | ||||||
- zones.d/main/commands | ||||||
- zones.d/main/hosts | ||||||
- zones.d/main/services | ||||||
icinga2_ca_path: | ||||||
description: CA folderpath, used for the API | ||||||
type: str | ||||||
default: /var/lib/icinga2/ca | ||||||
icinga2_cert_path: | ||||||
description: path for certificate to be used by API | ||||||
type: str | ||||||
default: /var/lib/icinga2/certs | ||||||
icinga2_state: | ||||||
description: expected state of the icinga2 service | ||||||
choices: [ reloaded, restarted, started, stopped ] | ||||||
default: started | ||||||
icinga2_enabled: | ||||||
description: expected status of the icinga2 service | ||||||
type: bool | ||||||
default: true | ||||||
icinga2_plugins: | ||||||
description: list of plugins to be included in the icinga2.conf | ||||||
type: list | ||||||
elements: str | ||||||
default: | ||||||
- plugins | ||||||
- plugins-contrib | ||||||
- windows-plugins | ||||||
- nscp | ||||||
icinga2_purge_features: | ||||||
description: >- | ||||||
Decides whether the unmanaged features should be purged or not. Default: true | ||||||
type: bool | ||||||
default: true | ||||||
icinga2_delegate_host: | ||||||
description: >- | ||||||
The role primarily delegates the ticket creation to the Icinga ca host. | ||||||
If the host is not listed with the same name in Ansible, you can set the name of the host in Ansible with this variable. | ||||||
example: `icinga2_delegate_host: icinga-master` | ||||||
type: str | ||||||
# TODO: change logic to make it more separated since not possible to validate as item.split | ||||||
# icinga2_objects: | ||||||
# description: >- | ||||||
# List of objects for which configuration file will generated. | ||||||
# COMPLEX object, can be either dict containing list of dict (host vars), or list of dict... | ||||||
# type: list | ||||||
# elements: dict |
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would not use a default here. The primary zone could be called anything really.
We should rather explain this one better in the documentation (and/or argument spec).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes indeed, this should not be a default.