-
-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #396 from Icinga/bug/director-wrong-ordering
Fix ordering in director module class
- Loading branch information
Showing
4 changed files
with
33 additions
and
18 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
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,27 @@ | ||
# @summary | ||
# Import or update the database schema. Also start the initial kickstart run if required. | ||
# | ||
# @api private | ||
# | ||
class icingaweb2::module::director::kickstart { | ||
assert_private() | ||
|
||
$import_schema = $icingaweb2::module::director::import_schema | ||
$kickstart = $icingaweb2::module::director::kickstart | ||
$icingacli_bin = $icingaweb2::globals::icingacli_bin | ||
|
||
if $import_schema { | ||
exec { 'director-migration': | ||
command => "${icingacli_bin} director migration run", | ||
onlyif => "${icingacli_bin} director migration pending", | ||
} | ||
|
||
if $kickstart { | ||
exec { 'director-kickstart': | ||
command => "${icingacli_bin} director kickstart run", | ||
onlyif => "${icingacli_bin} director kickstart required", | ||
require => Exec['director-migration'], | ||
} | ||
} | ||
} | ||
} |