-
-
Notifications
You must be signed in to change notification settings - Fork 23
config wireguard group #126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
stuartrobert
wants to merge
5
commits into
voxpupuli:master
Choose a base branch
from
stuartrobert:97_wireguard_group
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
e9638db
(#97) apply correct group on /etc/wireguard
rstuart-indue f29cdbb
(#97) replace literal refs to /etc/wireguard
rstuart-indue fd92f04
(#97) fix variable scope
rstuart-indue 69d28e5
Merge branch 'master' into 97_wireguard_group
stuartrobert dcf6f5a
Merge branch 'voxpupuli:master' into 97_wireguard_group
stuartrobert File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,3 @@ | ||
| --- | ||
|
|
||
| wireguard::config_directory_group: 'systemd-network' | ||
This file contains hidden or 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,3 @@ | ||
| --- | ||
|
|
||
| wireguard::config_directory_group: 'root' |
This file contains hidden or 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,13 @@ | ||
| --- | ||
| version: 5 | ||
|
|
||
| defaults: # Used for any hierarchy level that omits these keys. | ||
| datadir: data # This path is relative to hiera.yaml's directory. | ||
| data_hash: yaml_data # Use the built-in YAML backend. | ||
|
|
||
| hierarchy: | ||
| - name: "osfamily" | ||
| paths: | ||
| - "os/%{facts.os.family}.yaml" | ||
| - name: 'common' | ||
| path: 'common.yaml' |
This file contains hidden or 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 |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| # | ||
| # @summary manages the wireguard package | ||
| # | ||
| # @param config_directory_group specify the group on `$config_directory` | ||
| # @param manage_package if the package should be managed or not | ||
| # @param package_name the name of the package | ||
| # @param package_ensure the ensure state of the package | ||
|
|
@@ -12,6 +13,7 @@ | |
| # @author Tim Meusel <[email protected]> | ||
| # | ||
| class wireguard ( | ||
| String $config_directory_group, | ||
| Boolean $manage_package = true, | ||
| String[1] $package_name = 'wireguard-tools', | ||
| Enum['installed', 'latest', 'absent'] $package_ensure = 'installed', | ||
|
|
@@ -40,7 +42,7 @@ | |
| ensure => $_file_ensure, | ||
| owner => 'root', | ||
| mode => '0750', | ||
| group => 'systemd-network', | ||
| group => $config_directory_group, | ||
| * => $options, | ||
| } | ||
|
|
||
|
|
||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
has redhat no equivalent group?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not out of the box. The systemd-network group is only created if you install systemd-networkd. The RHEL 9 docs don't even mention any configuration using networkctl - here is the RHEL 9 networking documentation (free to access): https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html-single/configuring_and_managing_networking/index
On RHEL 9 wireguard-tools only requires that systemd-resolved be installed that is "extra" (ie not systemd-networkd). The default ownership on /etc/wireguard is root/root with mode 0700.
Looking at some old bugzilla reports, Redhat didn't want to support systemd-networkd for RHEL 8 and perhaps RHEL 9, but I've struggled to find mention of it in RHEL 9 docs.