Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

Commit

Permalink
Arrows according to Puppet style guide
Browse files Browse the repository at this point in the history
  • Loading branch information
jorritfolmer committed Apr 21, 2017
1 parent da8545d commit 41f8514
Show file tree
Hide file tree
Showing 15 changed files with 96 additions and 96 deletions.
16 changes: 8 additions & 8 deletions manifests/authentication.pp
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,17 @@
recurse => true,
purge => true,
force => true,
} ->
file { [
}
-> file { [
"${splunk_home}/etc/apps/${splunk_app_name}_saml_base",
"${splunk_home}/etc/apps/${splunk_app_name}_saml_base/${splunk_app_precedence_dir}",
"${splunk_home}/etc/apps/${splunk_app_name}_saml_base/metadata",]:
ensure => directory,
owner => $splunk_os_user,
group => $splunk_os_user,
mode => '0700',
} ->
file { "${splunk_home}/etc/apps/${splunk_app_name}_saml_base/${splunk_app_precedence_dir}/authentication.conf":
}
-> file { "${splunk_home}/etc/apps/${splunk_app_name}_saml_base/${splunk_app_precedence_dir}/authentication.conf":
ensure => present,
owner => $splunk_os_user,
group => $splunk_os_user,
Expand All @@ -78,17 +78,17 @@
recurse => true,
purge => true,
force => true,
} ->
file { [
}
-> file { [
"${splunk_home}/etc/apps/${splunk_app_name}_ldap_base",
"${splunk_home}/etc/apps/${splunk_app_name}_ldap_base/${splunk_app_precedence_dir}",
"${splunk_home}/etc/apps/${splunk_app_name}_ldap_base/metadata",]:
ensure => directory,
owner => $splunk_os_user,
group => $splunk_os_user,
mode => '0700',
} ->
file { "${splunk_home}/etc/apps/${splunk_app_name}_ldap_base/${splunk_app_precedence_dir}/authentication.conf":
}
-> file { "${splunk_home}/etc/apps/${splunk_app_name}_ldap_base/${splunk_app_precedence_dir}/authentication.conf":
ensure => present,
owner => $splunk_os_user,
group => $splunk_os_user,
Expand Down
16 changes: 8 additions & 8 deletions manifests/certs/s2s.pp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
group => $splunk_os_user,
mode => '0700',
recurse => true,
} ->
exec { 'openssl dhparam':
}
-> exec { 'openssl dhparam':
command => "openssl dhparam -outform PEM -out ${splunk_home}/etc/auth/certs/dhparam.pem ${dhparamsize}",
path => ['/bin', '/sbin', '/usr/bin', '/usr/sbin'],
creates => [
Expand All @@ -35,8 +35,8 @@
creates => [ "${splunk_home}/etc/auth/${sslrootcapath}", ],
require => File["${splunk_home}/etc/auth/certs"],
onlyif => '/usr/bin/test -e /etc/puppet/ssl/certs/ca.pem'
} ->
exec { 'openssl s2s 1 opensource puppet':
}
-> exec { 'openssl s2s 1 opensource puppet':
command => "cat /etc/puppet/ssl/private_keys/${::fqdn}.pem /etc/puppet/ssl/certs/${::fqdn}.pem > ${splunk_home}/etc/auth/${sslcertpath}",
path => ['/bin', '/sbin', '/usr/bin', '/usr/sbin'],
creates => [ "${splunk_home}/etc/auth/${sslcertpath}", ],
Expand All @@ -50,8 +50,8 @@
creates => [ "${splunk_home}/etc/auth/${sslrootcapath}", ],
require => File["${splunk_home}/etc/auth/certs"],
onlyif => '/usr/bin/test -e /etc/puppetlabs/puppet/ssl/certs/ca.pem'
} ->
exec { 'openssl s2s 1 commercial puppet':
}
-> exec { 'openssl s2s 1 commercial puppet':
command => "cat /etc/puppetlabs/puppet/ssl/private_keys/${::fqdn}.pem /etc/puppetlabs/puppet/ssl/certs/${::fqdn}.pem > ${splunk_home}/etc/auth/${sslcertpath}",
path => ['/bin', '/sbin', '/usr/bin', '/usr/sbin'],
creates => [ "${splunk_home}/etc/auth/certs/s2s.pem", ],
Expand All @@ -65,8 +65,8 @@
creates => [ "${splunk_home}/etc/auth/${sslrootcapath}", ],
require => File["${splunk_home}/etc/auth/certs"],
onlyif => '/usr/bin/test -e /var/lib/puppet/ssl/certs/ca.pem'
} ->
exec { 'openssl s2s 1 redhat puppet':
}
-> exec { 'openssl s2s 1 redhat puppet':
command => "cat /var/lib/puppet/ssl/private_keys/${::fqdn}.pem /var/lib/puppet/ssl/certs/${::fqdn}.pem > ${splunk_home}/etc/auth/${sslcertpath}",
path => ['/bin', '/sbin', '/usr/bin', '/usr/sbin'],
creates => [ "${splunk_home}/etc/auth/certs/s2s.pem", ],
Expand Down
4 changes: 2 additions & 2 deletions manifests/deploymentclient.pp
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
owner => $splunk_os_user,
group => $splunk_os_user,
mode => '0700',
} ->
file { "${splunk_home}/etc/apps/${splunk_app_name}/${splunk_app_precedence_dir}/deploymentclient.conf":
}
-> file { "${splunk_home}/etc/apps/${splunk_app_name}/${splunk_app_precedence_dir}/deploymentclient.conf":
ensure => present,
owner => $splunk_os_user,
group => $splunk_os_user,
Expand Down
40 changes: 20 additions & 20 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -102,26 +102,26 @@
include splunk::service

# make sure classes are properly ordered and contained
anchor { 'splunk_first': } ->
Class['splunk::installed'] ->
Class['splunk::inputs'] ->
Class['splunk::outputs'] ->
Class['splunk::certs::s2s'] ->
Class['splunk::web'] ->
Class['splunk::server::general'] ->
Class['splunk::server::ssl'] ->
Class['splunk::server::license'] ->
Class['splunk::server::kvstore'] ->
Class['splunk::server::clustering'] ->
Class['splunk::server::shclustering'] ->
Class['splunk::server::diskusage'] ->
Class['splunk::splunk_launch'] ->
Class['splunk::deploymentclient'] ->
Class['splunk::distsearch'] ->
Class['splunk::passwd'] ->
Class['splunk::authentication'] ->
Class['splunk::service'] ->
splunk::addsearchpeers { $searchpeers: }
anchor { 'splunk_first': }
-> Class['splunk::installed']
-> Class['splunk::inputs']
-> Class['splunk::outputs']
-> Class['splunk::certs::s2s']
-> Class['splunk::web']
-> Class['splunk::server::general']
-> Class['splunk::server::ssl']
-> Class['splunk::server::license']
-> Class['splunk::server::kvstore']
-> Class['splunk::server::clustering']
-> Class['splunk::server::shclustering']
-> Class['splunk::server::diskusage']
-> Class['splunk::splunk_launch']
-> Class['splunk::deploymentclient']
-> Class['splunk::distsearch']
-> Class['splunk::passwd']
-> Class['splunk::authentication']
-> Class['splunk::service']
-> splunk::addsearchpeers { $searchpeers: }
anchor { 'splunk_last': }
}

Expand Down
4 changes: 2 additions & 2 deletions manifests/inputs.pp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
owner => $splunk_os_user,
group => $splunk_os_user,
mode => '0700',
} ->
file { "${splunk_home}/etc/apps/${splunk_app_name}/${splunk_app_precedence_dir}/inputs.conf":
}
-> file { "${splunk_home}/etc/apps/${splunk_app_name}/${splunk_app_precedence_dir}/inputs.conf":
ensure => present,
owner => $splunk_os_user,
group => $splunk_os_user,
Expand Down
4 changes: 2 additions & 2 deletions manifests/outputs.pp
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
owner => $splunk_os_user,
group => $splunk_os_user,
mode => '0700',
} ->
file { "${splunk_home}/etc/apps/${splunk_app_name}/${splunk_app_precedence_dir}/outputs.conf":
}
-> file { "${splunk_home}/etc/apps/${splunk_app_name}/${splunk_app_precedence_dir}/outputs.conf":
ensure => present,
owner => $splunk_os_user,
group => $splunk_os_user,
Expand Down
8 changes: 4 additions & 4 deletions manifests/passwd.pp
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
mode => '0600',
content => ':admin:::',
replace => 'no',
} ->
exec { 'set admin passwd':
}
-> exec { 'set admin passwd':
command => "sed -i -e 's#^:admin:.*$#:admin:${hash}::${fn}:admin:${email}::#g' ${splunk_home}/etc/passwd",
unless => "grep -qe '^:admin:${hash}' ${splunk_home}/etc/passwd",
path => ['/bin', '/sbin', '/usr/bin', '/usr/sbin'],
} ->
file { "${splunk_home}/etc/.ui_login":
}
-> file { "${splunk_home}/etc/.ui_login":
ensure => present,
owner => $splunk_os_user,
mode => '0600',
Expand Down
36 changes: 18 additions & 18 deletions manifests/server/clustering.pp
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
recurse => true,
purge => true,
force => true,
} ->
file { [
}
-> file { [
"${splunk_home}/etc/apps/${splunk_app_name}_master_base",
"${splunk_home}/etc/apps/${splunk_app_name}_master_base/${splunk_app_precedence_dir}",
"${splunk_home}/etc/apps/${splunk_app_name}_master_base/metadata",
Expand All @@ -45,15 +45,15 @@
owner => $splunk_os_user,
group => $splunk_os_user,
mode => '0700',
} ->
file { "${splunk_home}/etc/apps/${splunk_app_name}_pass4symmkey_base/${splunk_app_precedence_dir}/server.conf":
}
-> file { "${splunk_home}/etc/apps/${splunk_app_name}_pass4symmkey_base/${splunk_app_precedence_dir}/server.conf":
ensure => present,
owner => $splunk_os_user,
group => $splunk_os_user,
replace => $splunk_app_replace,
content => template("splunk/${splunk_app_name}_pass4symmkey_base/local/server.conf"),
} ->
file { "${splunk_home}/etc/apps/${splunk_app_name}_master_base/${splunk_app_precedence_dir}/server.conf":
}
-> file { "${splunk_home}/etc/apps/${splunk_app_name}_master_base/${splunk_app_precedence_dir}/server.conf":
ensure => present,
owner => $splunk_os_user,
group => $splunk_os_user,
Expand All @@ -73,8 +73,8 @@
recurse => true,
purge => true,
force => true,
} ->
file { [
}
-> file { [
"${splunk_home}/etc/apps/${splunk_app_name}_slave_base",
"${splunk_home}/etc/apps/${splunk_app_name}_slave_base/${splunk_app_precedence_dir}",
"${splunk_home}/etc/apps/${splunk_app_name}_slave_base/metadata",
Expand All @@ -85,15 +85,15 @@
owner => $splunk_os_user,
group => $splunk_os_user,
mode => '0700',
} ->
file { "${splunk_home}/etc/apps/${splunk_app_name}_pass4symmkey_base/${splunk_app_precedence_dir}/server.conf":
}
-> file { "${splunk_home}/etc/apps/${splunk_app_name}_pass4symmkey_base/${splunk_app_precedence_dir}/server.conf":
ensure => present,
owner => $splunk_os_user,
group => $splunk_os_user,
replace => $splunk_app_replace,
content => template("splunk/${splunk_app_name}_pass4symmkey_base/local/server.conf"),
} ->
file { "${splunk_home}/etc/apps/${splunk_app_name}_slave_base/${splunk_app_precedence_dir}/server.conf":
}
-> file { "${splunk_home}/etc/apps/${splunk_app_name}_slave_base/${splunk_app_precedence_dir}/server.conf":
ensure => present,
owner => $splunk_os_user,
group => $splunk_os_user,
Expand All @@ -113,8 +113,8 @@
recurse => true,
purge => true,
force => true,
} ->
file { [
}
-> file { [
"${splunk_home}/etc/apps/${splunk_app_name}_searchhead_base",
"${splunk_home}/etc/apps/${splunk_app_name}_searchhead_base/${splunk_app_precedence_dir}",
"${splunk_home}/etc/apps/${splunk_app_name}_searchhead_base/metadata",
Expand All @@ -125,15 +125,15 @@
owner => $splunk_os_user,
group => $splunk_os_user,
mode => '0700',
} ->
file { "${splunk_home}/etc/apps/${splunk_app_name}_pass4symmkey_base/${splunk_app_precedence_dir}/server.conf":
}
-> file { "${splunk_home}/etc/apps/${splunk_app_name}_pass4symmkey_base/${splunk_app_precedence_dir}/server.conf":
ensure => present,
owner => $splunk_os_user,
group => $splunk_os_user,
replace => $splunk_app_replace,
content => template("splunk/${splunk_app_name}_pass4symmkey_base/local/server.conf"),
} ->
file { "${splunk_home}/etc/apps/${splunk_app_name}_searchhead_base/${splunk_app_precedence_dir}/server.conf":
}
-> file { "${splunk_home}/etc/apps/${splunk_app_name}_searchhead_base/${splunk_app_precedence_dir}/server.conf":
ensure => present,
owner => $splunk_os_user,
group => $splunk_os_user,
Expand Down
4 changes: 2 additions & 2 deletions manifests/server/diskusage.pp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
owner => $splunk_os_user,
group => $splunk_os_user,
mode => '0700',
} ->
file { "${splunk_home}/etc/apps/${splunk_app_name}_base/${splunk_app_precedence_dir}/server.conf":
}
-> file { "${splunk_home}/etc/apps/${splunk_app_name}_base/${splunk_app_precedence_dir}/server.conf":
ensure => present,
owner => $splunk_os_user,
group => $splunk_os_user,
Expand Down
4 changes: 2 additions & 2 deletions manifests/server/general.pp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
owner => $splunk_os_user,
group => $splunk_os_user,
mode => '0700',
} ->
file { "${splunk_home}/etc/apps/${splunk_app_name}/${splunk_app_precedence_dir}/server.conf":
}
-> file { "${splunk_home}/etc/apps/${splunk_app_name}/${splunk_app_precedence_dir}/server.conf":
ensure => present,
owner => $splunk_os_user,
group => $splunk_os_user,
Expand Down
16 changes: 8 additions & 8 deletions manifests/server/kvstore.pp
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@
recurse => true,
purge => true,
force => true,
} ->
file { ["${splunk_home}/etc/apps/${splunk_app_name}_disabled",
}
-> file { ["${splunk_home}/etc/apps/${splunk_app_name}_disabled",
"${splunk_home}/etc/apps/${splunk_app_name}_disabled/${splunk_app_precedence_dir}",
"${splunk_home}/etc/apps/${splunk_app_name}_disabled/metadata",]:
ensure => directory,
owner => $splunk_os_user,
group => $splunk_os_user,
mode => '0700',
} ->
file { "${splunk_home}/etc/apps/${splunk_app_name}_disabled/${splunk_app_precedence_dir}/server.conf":
}
-> file { "${splunk_home}/etc/apps/${splunk_app_name}_disabled/${splunk_app_precedence_dir}/server.conf":
ensure => present,
owner => $splunk_os_user,
group => $splunk_os_user,
Expand All @@ -37,16 +37,16 @@
recurse => true,
purge => true,
force => true,
} ->
file { ["${splunk_home}/etc/apps/${splunk_app_name}_base",
}
-> file { ["${splunk_home}/etc/apps/${splunk_app_name}_base",
"${splunk_home}/etc/apps/${splunk_app_name}_base/${splunk_app_precedence_dir}",
"${splunk_home}/etc/apps/${splunk_app_name}_base/metadata",]:
ensure => directory,
owner => $splunk_os_user,
group => $splunk_os_user,
mode => '0700',
} ->
file { "${splunk_home}/etc/apps/${splunk_app_name}_base/${splunk_app_precedence_dir}/server.conf":
}
-> file { "${splunk_home}/etc/apps/${splunk_app_name}_base/${splunk_app_precedence_dir}/server.conf":
ensure => present,
owner => $splunk_os_user,
group => $splunk_os_user,
Expand Down
4 changes: 2 additions & 2 deletions manifests/server/license.pp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
owner => $splunk_os_user,
group => $splunk_os_user,
mode => '0700',
} ->
file { "${splunk_home}/etc/apps/${splunk_app_name}/${splunk_app_precedence_dir}/server.conf":
}
-> file { "${splunk_home}/etc/apps/${splunk_app_name}/${splunk_app_precedence_dir}/server.conf":
ensure => present,
owner => $splunk_os_user,
group => $splunk_os_user,
Expand Down
16 changes: 8 additions & 8 deletions manifests/server/shclustering.pp
Original file line number Diff line number Diff line change
Expand Up @@ -31,25 +31,25 @@
owner => $splunk_os_user,
group => $splunk_os_user,
mode => '0700',
} ->
file { "${splunk_home}/etc/apps/${splunk_app_name}_pass4symmkey_base/${splunk_app_precedence_dir}/server.conf":
}
-> file { "${splunk_home}/etc/apps/${splunk_app_name}_pass4symmkey_base/${splunk_app_precedence_dir}/server.conf":
ensure => present,
owner => $splunk_os_user,
group => $splunk_os_user,
replace => $splunk_app_replace,
content => template("splunk/${splunk_app_name}_pass4symmkey_base/local/server.conf"),
} ->
file { "${splunk_home}/etc/apps/${splunk_app_name}_base/${splunk_app_precedence_dir}/server.conf":
}
-> file { "${splunk_home}/etc/apps/${splunk_app_name}_base/${splunk_app_precedence_dir}/server.conf":
ensure => present,
owner => $splunk_os_user,
group => $splunk_os_user,
replace => $splunk_app_replace,
content => template("splunk/${splunk_app_name}_base/local/server.conf"),
} ->
}
# unfortunately we need to edit etc/system/local/server.conf directly,
# to prevent the SH Deployer from overwriting server specific config
# directives like mgmt_uri
augeas { "${splunk_home}/etc/system/local/server.conf/shclustering":
-> augeas { "${splunk_home}/etc/system/local/server.conf/shclustering":
lens => 'Puppet.lns',
incl => "${splunk_home}/etc/system/local/server.conf",
changes => [
Expand All @@ -67,8 +67,8 @@
owner => $splunk_os_user,
group => $splunk_os_user,
mode => '0700',
} ->
file { "${splunk_home}/etc/apps/${splunk_app_name}_pass4symmkey_base/${splunk_app_precedence_dir}/server.conf":
}
-> file { "${splunk_home}/etc/apps/${splunk_app_name}_pass4symmkey_base/${splunk_app_precedence_dir}/server.conf":
ensure => present,
owner => $splunk_os_user,
group => $splunk_os_user,
Expand Down
Loading

0 comments on commit 41f8514

Please sign in to comment.