Nodeless setup

This commit is contained in:
jigen 2015-02-20 19:21:34 +01:00
parent 8e16d2b5aa
commit 5d150b7a71

View file

@ -1,92 +1,8 @@
$admin=hiera('ortiche-admin') $admin=hiera('ortiche-admin')
notify{"Variable is ${::admin}": } notify{"Variable is ${::admin}": }
$host=hiera('ortiche-host')
notify{"Variable is ${::host}": }
hiera_include('ortiche-classes') hiera_include('ortiche-classes')
Exec { path => [ "/bin/", "/sbin/" , "/usr/bin/", "/usr/sbin/" ,
"/usr/local/bin/", "/usr/local/sbin/" ]
}
exec { "create_ortiche_directory":
command => "/bin/mkdir -p /etc/ortiche",
creates => "/etc/ortiche",
before => Exec['test_ortiche_host_dir'],
}
exec {'test_ortiche_host_dir':
command => "false",
unless => "test -d /etc/ortiche/$::hostname",
}
user { 'ortiche':
ensure => 'present',
}
package { "screen":
ensure => "latest"
}
class { 'apt':
use_volatile => true,
}
class { 'apt::apticron':
email => 'gestione@posta.indivia.net',
}
node 'snf-30710' {
postfix::config {
"relayhost": value => "[smtp.indivia.net]:25";
}
class { 'postfix':
myorigin => 'dev_1.indivia.tk',
anon_sasl => 'yes',
}
}
node 'snf-29152' {
file {"/etc/ssl/certs/tanacetum_mailserver_cert.pem":
ensure => 'present',
source => "/etc/ortiche/$::hostname/certs/ssl-cert-snakeoil.pem",
owner => 'root',
group => 'root',
mode => '0664',
require => Exec['test_ortiche_host_dir'],
}
file {"/etc/ssl/private/tanacetum_mailserver_key.pem":
ensure => 'present',
source => "/etc/ortiche/$::hostname/private/ssl-cert-snakeoil.key",
owner => 'root',
group => 'root',
mode => '0600',
require => Exec['test_ortiche_host_dir'],
}
host { 'tanacetum.ortiche.net':
ensure => 'present',
ip => '83.212.126.162',
host_aliases => ['tanacetum.indivia.tk', 'tanacetum'],
}
postfix::config {
"relayhost": value => "[smtp.indivia.net]:25";
"smtpd_tls_cert_file": value => "/etc/ssl/certs/tanacetum_mailserver_cert.pem";
"smtpd_tls_key_file" : value => "/etc/ssl/private/tanacetum_mailserver_key.pem";
}
# class { 'postfix':
# myorigin => 'dev_2.indivia.tk',
# anon_sasl => 'yes',
# root_mail_recipient => "gestione@posta.indivia.net",
# require => [ File['/etc/ssl/certs/tanacetum_mailserver_cert.pem'],
# File['/etc/ssl/private/tanacetum_mailserver_key.pem'] ],
# }
}
node default { node default {
# intentionally nothing here class {'ortiche-base': }
} }