-
-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New parameters to manage systemd-nspawn
New parameters `systemd::manage_nspawn` defaulting to false, if true it will ensure that the `machinectl` and `systemd-nspawn` commands are available. When `true`. ``` { [email protected] => "disabled", } ```
- Loading branch information
1 parent
48e0752
commit d59ecc2
Showing
9 changed files
with
90 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
systemd::nspawn_package: 'systemd-container' |
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,26 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'spec_helper_acceptance' | ||
|
||
describe 'systemd with manage_nspawn true' do | ||
machinectl = (fact('os.name') == 'Debian') && %w[10 11].includes?(fact('os.major.version')) ? '/bin/machinectl' : '/usr/bin/machinectl' | ||
|
||
context 'configure nspawn' do | ||
let(:manifest) do | ||
<<~PUPPET | ||
class { 'systemd': | ||
manage_nspawn => true, | ||
} | ||
PUPPET | ||
end | ||
|
||
it 'works idempotently with no errors' do | ||
apply_manifest(manifest, catch_failures: true) | ||
apply_manifest(manifest, catch_changes: true) | ||
end | ||
|
||
describe file(machinectl) do | ||
it { is_expected.to be_file } | ||
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