Skip to content

Commit

Permalink
Add dynflow database path to config
Browse files Browse the repository at this point in the history
  • Loading branch information
stbenjam committed Feb 4, 2016
1 parent 273fc1c commit 0fdb7ad
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions manifests/plugin/dynflow.pp
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,17 @@
#
# $listen_on:: Proxy feature listens on https, http, or both
#
# $database_path:: Path to the SQLite database file
#
class foreman_proxy::plugin::dynflow (
$enabled = $::foreman_proxy::plugin::dynflow::params::enabled,
$listen_on = $::foreman_proxy::plugin::dynflow::params::listen_on,
$database_path = $::foreman_proxy::plugin::dynflow::params::database_path,
) inherits foreman_proxy::plugin::dynflow::params {

validate_bool($enabled)
validate_listen_on($listen_on)
validate_absolute_path($database_path)

foreman_proxy::plugin { 'dynflow':
} ->
Expand Down
1 change: 1 addition & 0 deletions manifests/plugin/dynflow/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
class foreman_proxy::plugin::dynflow::params {
$enabled = true
$listen_on = 'https'
$database_path = '/var/spool/foreman-proxy/dynflow/dynflow.sqlite'
}
2 changes: 1 addition & 1 deletion spec/classes/foreman_proxy__plugin__dynflow_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
:ensure => 'file',
:owner => 'root',
:mode => '0640',
:content => /:enabled: https/
:content => %r{:enabled: https\n:database: /var/spool/foreman-proxy/dynflow/dynflow.sqlite}
})
end
end
Expand Down
1 change: 1 addition & 0 deletions templates/plugin/dynflow.yml.erb
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
---
:enabled: <%= @module_enabled %>
:database: <%= scope.lookupvar('::foreman_proxy::plugin::dynflow::database_path') %>

0 comments on commit 0fdb7ad

Please sign in to comment.