systemd service support
basic systemd support implemented:
- service definitions
- logind.conf (disables IPC deletion on user logout)
- Creates service definitions: /etc/systemd/system/${servicename}.service
- Manages /etc/systemd/logind.conf
This module requires pluginsync enabled
basic example from eyp-kibana:
systemd::service { 'kibana':
execstart => "${basedir}/${productname}/bin/kibana",
require => [ Class['systemd'], File["${basedir}/${productname}/config/kibana.yml"] ],
before => Service['kibana'],
}
add service dependency:
systemd::service { 'oracleasm':
description => 'Load oracleasm Modules',
after => 'iscsi.service',
type => 'oneshot',
remain_after_exit => true,
execstart => '/usr/sbin/service oracleasm start_sysctl',
execstop => '/usr/sbin/service oracleasm stop_sysctl',
execreload => '/usr/sbin/service oracleasm restart_sysctl',
}
- removeipc: IPC deletion on user logout (default: no)
- execstart: command to start daemon
- execstop: command to stop daemon (if any)
- restart: restart daemon if crashes (default: always)
- user: username to use (default: root)
- group: group to use (default: root)
- servicename: service name (default: resource's name)
- forking: expect fork to background (default: false)
Should work anywhere, tested on CentOS 7
We are pushing to have acceptance testing in place, so any new feature should have some test to check both presence and absence of any feature
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request