-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add custom config files tasks * add tests for custom configs * add integration test for custom file
- Loading branch information
1 parent
5bd290e
commit dc93ae2
Showing
6 changed files
with
53 additions
and
3 deletions.
There are no files selected for viewing
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,3 @@ | ||
object CheckCommand "test" { | ||
command = [ PluginDir + "/bin/true" ] | ||
} |
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,13 @@ | ||
def test_icinga2_custom_files(host): | ||
i2_file = host.file("/etc/icinga2/zones.d/main/commands/custom_commands.conf") | ||
print(i2_file.content_string) | ||
assert i2_file.is_file | ||
assert i2_file.contains('object CheckCommand "test" {') | ||
if host.system_info.distribution == 'centos': | ||
assert i2_file.user == "icinga" | ||
assert i2_file.group == "icinga" | ||
assert i2_file.mode == 0o644 | ||
if host.system_info.distribution == 'debian': | ||
assert i2_file.user == "nagios" | ||
assert i2_file.group == "nagios" | ||
assert i2_file.mode == 0o644 |
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