forked from voxpupuli/puppet-systemd
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Socket support for manage unit and dropin
A socket file can now be created: ```puppet systemd::manage_unit{'arc.socket': ensure => present, unit_entry => { 'Description' => 'My great socket', }, socket_entry => { 'Type' => 'simple', 'ExecStart' => '/usr/sbin/arcd /usr/libexec/arcd/arcd.pl', 'StandardInput => 'socket', } ``` All socket directives from 253. * https://www.freedesktop.org/software/systemd/man/systemd.socket.html
- Loading branch information
1 parent
f2382e0
commit 5371ac0
Showing
8 changed files
with
297 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'spec_helper' | ||
|
||
describe 'Systemd::Unit::Socket' do | ||
%w[ListenStream ListenDatagram ListenSequentialPacket].each do |assert| | ||
context "with a key of #{assert} can have values of a path" do | ||
it { is_expected.to allow_value({ assert => 200 }) } | ||
it { is_expected.to allow_value({ assert => '/etc/passwd' }) } | ||
it { is_expected.to allow_value({ assert => '@/tmp/socket' }) } | ||
end | ||
end | ||
|
||
%w[ListenMessageQueue].each do |assert| | ||
context "with a key of #{assert} can have values of a queue" do | ||
it { is_expected.to allow_value({ assert => '/mything' }) } | ||
it { is_expected.not_to allow_value({ assert => 'mything' }) } | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.