require => Exec['apt_update']
}
$cass_ip = $ips[cassiopeia]
- file {'/etc/systemd/system/tcpserial.service':
+ systemd::unit_file {'tcpserial.service':
ensure => 'file',
content => epp('gigi/tcpserial'),
require => Package['tcpserial']
source => 'puppet:///modules/cassiopeia/signer_client.key'
}
- file { '/etc/systemd/system/cassiopeia-client.service':
+ systemd::unit_file { 'cassiopeia-client.service':
source => 'puppet:///modules/gigi/cassiopeia-client.service',
ensure => 'present'
} ->
group => 'git',
before => Service['gitweb.service']
}
- file{ '/etc/systemd/system/git.socket':
+ systemd::unit_file {'git.socket':
ensure => 'file',
source => 'puppet:///modules/gitweb/git.socket',
before => Service['git.socket']
}
- file{ '/etc/systemd/system/git@.service':
+ systemd::unit_file {'git@.service':
ensure => 'file',
source => 'puppet:///modules/gitweb/git@.service',
before => Service['git.socket']
provider => 'systemd',
enable => true
}
- file{ '/etc/systemd/system/gitweb.service':
+ systemd::unit_file {'gitweb.service':
ensure => 'file',
source => 'puppet:///modules/gitweb/gitweb.service',
notify => Service['gitweb.service']
file{ '/etc/systemd/system/fcgiwrap.socket.d':
ensure => 'directory'
}
- file{ '/etc/systemd/system/fcgiwrap.socket.d/ListenStream.conf':
+ systemd::unit_file {'fcgiwrap.socket.d/ListenStream.conf':
ensure => 'file',
source => 'puppet:///modules/gitweb/fcgiwrap-ListenStream.conf',
notify => Service['fcgiwrap.socket']
file{ '/etc/systemd/system/fcgiwrap.service.d':
ensure => 'directory'
}
- file{ '/etc/systemd/system/fcgiwrap.service.d/sandbox.conf':
+ systemd::unit_file {'fcgiwrap.service.d/sandbox.conf':
ensure => 'file',
source => 'puppet:///modules/gitweb/fcgiwrap-sandbox.conf',
notify => Service['fcgiwrap.socket']
require => Exec['apt_update']
}
$cass_ip='';
- file {'/etc/systemd/system/tcpserial.service':
+ systemd::unit_file {'tcpserial.service':
ensure => 'file',
content => epp('gigi/tcpserial'),
require => Package['tcpserial']
content => epp('gigi/cassiopeia-client-conf'),
}
- file {'/etc/systemd/system/cassiopeia-signer.service':
+ systemd::unit_file {'cassiopeia-signer.service':
ensure => 'file',
source => 'puppet:///modules/gigi/cassiopeia-signer.service',
}->
--- /dev/null
+class systemd (){
+ exec {'systemctl-daemon-reload':
+ command => '/bin/systemctl daemon-reload',
+ refreshonly => true
+ }
+}
\ No newline at end of file
--- /dev/null
+define systemd::unit_file(
+ $ensure = file,
+ $path = '/etc/systemd/system',
+ $content = undef,
+ $source = undef,
+) {
+ include ::systemd
+
+ file { "${path}/${title}":
+ ensure => $ensure,
+ content => $content,
+ source => $source,
+ owner => 'root',
+ group => 'root',
+ mode => '0644',
+ notify => Exec['systemctl-daemon-reload'],
+ }
+}