Aggiunto test di /etc/ortiche e certificati con dipendenze
This commit is contained in:
parent
7bfa897b33
commit
ffd68d61af
1 changed files with 35 additions and 2 deletions
|
@ -2,6 +2,16 @@ 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',
|
||||
|
@ -30,6 +40,24 @@ node 'snf-30710' {
|
|||
}
|
||||
|
||||
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',
|
||||
|
@ -37,12 +65,17 @@ node 'snf-29152' {
|
|||
}
|
||||
|
||||
postfix::config {
|
||||
"relayhost": value => "[smtp.indivia.net]:25";
|
||||
"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'] ],
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue