Skip to content

Commit

Permalink
Merge pull request #99 from StackStorm/notify-init-part-deux
Browse files Browse the repository at this point in the history
adding tag to all resources
  • Loading branch information
jfryman committed Oct 15, 2015
2 parents 21bc5d6 + 290357a commit bdaaf76
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 43 deletions.
16 changes: 9 additions & 7 deletions manifests/auth/mongodb.pp
Expand Up @@ -43,61 +43,61 @@
}
$_api_url = $::st2::api_url

# Defaults for st2config to ensure service refresh propagates
# anytime these values are changed. See profile/server.pp
# for more info
Ini_setting {
tag => 'st2::config',
}

ini_setting { 'auth_mode':
ensure => present,
path => '/etc/st2/st2.conf',
section => 'auth',
setting => 'mode',
value => 'standalone',
tag => 'st2::config',
}
ini_setting { 'auth_backend':
ensure => present,
path => '/etc/st2/st2.conf',
section => 'auth',
setting => 'backend',
value => 'mongodb',
tag => 'st2::config',
}
ini_setting { 'auth_backend_kwargs':
ensure => present,
path => '/etc/st2/st2.conf',
section => 'auth',
setting => 'backend_kwargs',
value => "{\"db_host\": \"${db_host}\", \"db_port\": \"${db_port}\", \"db_name\": \"${db_name}\"}",
tag => 'st2::config',
}
ini_setting { 'auth_debug':
ensure => present,
path => '/etc/st2/st2.conf',
section => 'auth',
setting => 'debug',
value => $_debug,
tag => 'st2::config',
}
ini_setting { 'auth_ssl':
ensure => present,
path => '/etc/st2/st2.conf',
section => 'auth',
setting => 'use_ssl',
value => $_ssl,
tag => 'st2::config',
}
ini_setting { 'auth_api_url':
ensure => present,
path => '/etc/st2/st2.conf',
section => 'auth',
setting => 'api_url',
value => $_api_url,
tag => 'st2::config',
}
ini_setting { 'auth_logging_file':
ensure => present,
path => '/etc/st2/st2.conf',
section => 'auth',
setting => 'logging',
value => $logging_file,
tag => 'st2::config',
}

# SSL Settings
Expand All @@ -112,13 +112,15 @@
section => 'auth',
setting => 'cert',
value => $ssl_cert,
tag => 'st2::config',
}
ini_setting { 'auth_ssl_key':
ensure => present,
path => '/etc/st2/st2.conf',
section => 'auth',
setting => 'key',
value => $ssl_key,
tag => 'st2::config',
}
}
}
10 changes: 3 additions & 7 deletions manifests/auth/proxy.pp
Expand Up @@ -20,32 +20,28 @@
}
$_api_url = $::st2::api_url

# Defaults for st2config to ensure service refresh propagates
# anytime these values are changed. See profile/server.pp
# for more info
Ini_setting {
tag => 'st2::config',
}

ini_setting { 'auth_mode':
ensure => present,
path => '/etc/st2/st2.conf',
section => 'auth',
setting => 'mode',
value => 'proxy',
tag => 'st2::config',
}
ini_setting { 'auth_debug':
ensure => present,
path => '/etc/st2/st2.conf',
section => 'auth',
setting => 'debug',
value => $_debug,
tag => 'st2::config',
}
ini_setting { 'auth_api_url':
ensure => present,
path => '/etc/st2/st2.conf',
section => 'auth',
setting => 'api_url',
value => $_api_url,
tag => 'st2::config',
}
}
16 changes: 9 additions & 7 deletions manifests/auth/standalone.pp
Expand Up @@ -43,61 +43,61 @@
$_cli_username = $::st2::cli_username
$_cli_password = $::st2::cli_password

# Defaults for st2config to ensure service refresh propagates
# anytime these values are changed. See profile/server.pp
# for more info
Ini_setting {
tag => 'st2::config',
}

ini_setting { 'auth_mode':
ensure => present,
path => '/etc/st2/st2.conf',
section => 'auth',
setting => 'mode',
value => 'standalone',
tag => 'st2::config',
}
ini_setting { 'auth_backend':
ensure => present,
path => '/etc/st2/st2.conf',
section => 'auth',
setting => 'backend',
value => 'flat_file',
tag => 'st2::config',
}
ini_setting { 'auth_backend_kwargs':
ensure => present,
path => '/etc/st2/st2.conf',
section => 'auth',
setting => 'backend_kwargs',
value => "{\"file_path\": \"${htpasswd_file}\"}",
tag => 'st2::config',
}
ini_setting { 'auth_debug':
ensure => present,
path => '/etc/st2/st2.conf',
section => 'auth',
setting => 'debug',
value => $_debug,
tag => 'st2::config',
}
ini_setting { 'auth_ssl':
ensure => present,
path => '/etc/st2/st2.conf',
section => 'auth',
setting => 'use_ssl',
value => $_ssl,
tag => 'st2::config',
}
ini_setting { 'auth_api_url':
ensure => present,
path => '/etc/st2/st2.conf',
section => 'auth',
setting => 'api_url',
value => $_api_url,
tag => 'st2::config',
}
ini_setting { 'auth_logging_file':
ensure => present,
path => '/etc/st2/st2.conf',
section => 'auth',
setting => 'logging',
value => $logging_file,
tag => 'st2::config',
}

# System Users
Expand Down Expand Up @@ -132,13 +132,15 @@
section => 'auth',
setting => 'cert',
value => $ssl_cert,
tag => 'st2::config',
}
ini_setting { 'auth_ssl_key':
ensure => present,
path => '/etc/st2/st2.conf',
section => 'auth',
setting => 'key',
value => $ssl_key,
tag => 'st2::config',
}
}
}
1 change: 1 addition & 0 deletions manifests/helper/actionrunner_upstart.pp
Expand Up @@ -22,5 +22,6 @@
enable => true,
hasstatus => true,
hasrestart => true,
tag => 'st2::server',
}
}
17 changes: 9 additions & 8 deletions manifests/helper/auth_manager.pp
Expand Up @@ -25,34 +25,29 @@
tag('st2::auth_manager')

# Common settings for all auth backends

# Defaults for st2config to ensure service refresh propagates
# anytime these values are changed. See profile/server.pp
# for more info
Ini_setting {
tag => 'st2::config',
}

ini_setting { 'auth_debug':
ensure => present,
path => "${_st2_conf_file}",
section => 'auth',
setting => 'debug',
value => $_debug,
tag => 'st2::config',
}
ini_setting { 'auth_api_url':
ensure => present,
path => "${_st2_conf_file}",
section => 'auth',
setting => 'api_url',
value => $_api_url,
tag => 'st2::config',
}
ini_setting { 'auth_mode':
ensure => present,
path => "${_st2_conf_file}",
section => 'auth',
setting => 'mode',
value => $auth_mode,
tag => 'st2::config',
}

if $auth_mode == 'standalone' {
Expand All @@ -62,20 +57,23 @@
section => 'auth',
setting => 'backend',
value => "${auth_backend}",
tag => 'st2::config',
}
ini_setting { 'auth_logging_file':
ensure => present,
path => "${_st2_conf_file}",
section => 'auth',
setting => 'logging',
value => "${_st2_api_logging_file}",
tag => 'st2::config',
}
ini_setting { 'auth_ssl':
ensure => present,
path => "${_st2_conf_file}",
section => 'auth',
setting => 'use_ssl',
value => "${_use_ssl}",
tag => 'st2::config',
}


Expand All @@ -91,13 +89,15 @@
section => 'auth',
setting => 'cert',
value => "${_ssl_cert}",
tag => 'st2::config',
}
ini_setting { 'auth_ssl_key':
ensure => present,
path => "${_st2_conf_file}",
section => 'auth',
setting => 'key',
value => "${_ssl_key}",
tag => 'st2::config',
}
}

Expand Down Expand Up @@ -137,6 +137,7 @@
section => 'auth',
setting => 'backend_kwargs',
value => "${_auth_backend_kwargs}",
tag => 'st2::config',
}
}
} else {
Expand Down
1 change: 1 addition & 0 deletions manifests/helper/service_manager.pp
Expand Up @@ -78,6 +78,7 @@
hasstatus => true,
hasrestart => true,
provider => $_init_type,
tag => 'st2::server',
}

Package[$_package] ~> Service[$_subsystem]
Expand Down
4 changes: 0 additions & 4 deletions manifests/profile/mistral.pp
Expand Up @@ -215,10 +215,6 @@
# Defaults for Mistral Config to ensure service refresh propagates
# anytime these values are changed. See profile/mistral.pp
# for more info
Ini_setting {
tag => 'mistral::config',
}

ini_setting { 'connection config':
ensure => present,
path => '/etc/mistral/mistral.conf',
Expand Down

0 comments on commit bdaaf76

Please sign in to comment.