Skip to content
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

Remove duplicate target parameter section in icinga2::object::timeper… #23

Merged
merged 1 commit into from
Nov 28, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -336,11 +336,11 @@ Strings are parsed in chunks, by splitting the original string into separate sub
such as `+`, `-`, `in`, `&&`, `||`, etc.

**NOTICE**: This splitting only works for keywords that are surrounded by whitespace, e.g.:
```
```
attr => 'string1 + string2 - string3'
```

The algorithm will loop over the parameter and start by splitting it into 'string1' and 'string2 - string3'.
The algorithm will loop over the parameter and start by splitting it into 'string1' and 'string2 - string3'.
'string1' will be passed to the sub function 'value_types' and then the algorithm will continue parsing the rest of the
string ('string2 - string3'), splitting it, passing it to value_types, etc.

Expand Down Expand Up @@ -419,7 +419,7 @@ icinga2::object::notification { 'testnotification':
ignore => [ 'host.vars.os == Windows' ],
user_groups => ['icingaadmins']
}
```
```

Assign all Linux hosts to a hostgroup:
``` puppet
Expand Down Expand Up @@ -1363,9 +1363,8 @@ Set to present enables the endpoint object, absent disabled it. Defaults to `pre
##### `display_name`
A short description of the time period.

##### `update`
The "update" script method takes care of updating the internal representation of the time period. In virtually all cases
you should import the "legacy-timeperiod" template to take care of this setting.
##### `import`
Sorted List of templates to include. Defaults to [ "legacy-timeperiod" ].

##### `ranges`
A dictionary containing information which days and durations apply to this timeperiod.
Expand All @@ -1383,10 +1382,7 @@ An array of timeperiods, which should include into your timerange
Set to true creates a template instead of an object. Defaults to `false`

##### `target`
Destination config file to store in this object. File will be declared the first time.

##### `target`
Destination config file to store in this object. File will be declared at the first time.
Destination config file to store this object in. File will be declared on the first run.

##### `order`
String to control the position in the target file, sorted alpha numeric.
Expand Down
17 changes: 5 additions & 12 deletions manifests/object/timeperiod.pp
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@
# [*display_name*]
# A short description of the time period.
#
# [*update*]
# The "update" script method takes care of updating the internal
# representation of the time period. In virtually all cases you should import
# the "legacy-timeperiod" template to take care of this setting.
# [*import*]
# Sorted List of templates to include. Defaults to [ "legacy-timeperiod" ].
#
# [*ranges*]
# A dictionary containing information which days and durations apply to this
Expand All @@ -32,12 +30,7 @@
# Set to true creates a template instead of an object. Defaults to false.
#
# [*target*]
# Destination config file to store in this object. File will be declared the
# first time.
#
# [*target*]
# Destination config file to store in this object. File will be declared at the
# first time.
# Destination config file to store this object in. File will be declared on the first run.
#
# [*order*]
# String to control the position in the target file, sorted alpha numeric.
Expand Down Expand Up @@ -75,8 +68,8 @@
if $display_name { validate_string ($display_name) }
validate_hash ($ranges)
if $prefer_includes { validate_bool ($prefer_includes) }
if $excludes { validate_string ($excludes) }
if $includes { validate_string ($includes) }
if $excludes { validate_array ($excludes) }
if $includes { validate_array ($includes) }

# compose attributes
$attrs = {
Expand Down