-
Notifications
You must be signed in to change notification settings - Fork 270
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #18757 - Move foreman-tasks service to Foreman
As per #18618, the dynflow executor is moving over to Foreman, in order to support ActiveJob. Tasks will provide an UI and persistence layer for Dynflow, but Foreman should be able to run jobs without it too. Part of this effort includes moving the Dynflow executor over to Foreman, which at the moment is managed by the foreman-tasks service.
- Loading branch information
Showing
8 changed files
with
66 additions
and
14 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
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,28 @@ | ||
# = foreman-tasks service | ||
# | ||
# Service for the foreman-tasks service, which starts a Dynflow executor | ||
# for background job processing in Foreman. Not to be confused with the | ||
# foreman-tasks plugin. | ||
# | ||
# === Parameters: | ||
# | ||
# $service:: Service name | ||
# type:String | ||
# | ||
# $ensure:: State the service should be in | ||
# type:Enum['absent', 'present'] | ||
# | ||
# $enable:: Whether to enable the service or not | ||
# type:String | ||
|
||
class foreman::tasks_service( | ||
$service = $::foreman::params::tasks_service, | ||
$ensure = $::foreman::params::tasks_service_ensure, | ||
$enable = $::foreman::params::tasks_service_enable, | ||
) inherits foreman::params { | ||
service { 'foreman-tasks': | ||
ensure => $ensure, | ||
enable => $enable, | ||
name => $service, | ||
} | ||
} |
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 @@ | ||
require 'spec_helper' | ||
|
||
describe 'foreman::tasks_service' do | ||
let :facts do | ||
on_supported_os['redhat-7-x86_64'] | ||
end | ||
|
||
it { should contain_service('foreman-tasks').with({ | ||
'ensure' => 'running', | ||
'enable' => true, | ||
'name' => 'foreman-tasks' | ||
})} | ||
end |
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