Skip to content
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

Exported peers #82

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

Conversation

brunoleon
Copy link

Pull Request (PR) description

Add support for peers using exported ressources

Declaring everything in hiera is not always convenient.
This commit gives the choice to use exported resources
so that peers declare themselves on each other

This Pull Request (PR) fixes the following issues

brunoleon added 3 commits May 16, 2023 08:53
Declaring everything in hiera is not always convenient.
This commit gives the choice to use exported resources
so that peers declare themselves on each other.
@brunoleon
Copy link
Author

I updated the requested files notably REFERENCES.md but it is still marked outdated. Not sure what can be done to fix it

Before relying on it we need to check for its presence.
The facts is actually available only after a Puppet pass
which will deploy the keys on the target host
@smortex
Copy link
Member

smortex commented May 22, 2023

I updated the requested files notably REFERENCES.md but it is still marked outdated. Not sure what can be done to fix it

This usually happen when your bundle is outdated.

Run bundle update to make sure you are using the latest compatible gems.

manifests/peer.pp Outdated Show resolved Hide resolved
templates/wireguard_peer.epp Outdated Show resolved Hide resolved
manifests/peer.pp Outdated Show resolved Hide resolved
manifests/interface.pp Outdated Show resolved Hide resolved
Comment on lines +248 to +249
if 'wireguard_pubkeys' in $facts {
if $interface in $facts['wireguard_pubkeys'] {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a benefit for checking if wireguard_pubkeys is in $facts and not directly using if $interface in $facts['wireguard_pubkeys']?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wireguard_pubkeys fact is not present in facts on first run , so we cannot check is $interface is present in it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants