Skip to content

Conversation

@baurmatt
Copy link
Contributor

This adds support for using the deferred function in Puppet 6:

include wireguard

wireguard::interface { 'wg0':
  private_key => Deferred('wireguard::genprivatekey', ['/etc/wireguard/wg0.key']),
  listen_port => 53098,
}

I would suggested reviewing/merging #20 first because it will extend the test matrix with Puppet 5/6 and will therefore ensure this change is tested on all supported Puppet versions.

Regarding tests for the Deferred usage: I think this isn't currently possible because I fail to see an option to pass the Deferred function in rspec through the params variable.

This differs from #6 because it adds a couple more things:

  • Supports Puppet 4/5/6
  • Allows the included function to be used as Deferred function
  • Test for all changed/introduced function

@bastelfreak
Copy link
Contributor

@baurmatt any chance you can rebase this?

@baurmatt
Copy link
Contributor Author

@bastelfreak Done! :) Do you have merge rights? :)

@bastelfreak
Copy link
Contributor

@baurmatt sadly I don't :( but I would like to use your code

@spacedog can you take a look please and merge this?

@bastelfreak
Copy link
Contributor

@spacedog hey, any chance you can take a look?

@spacedog
Copy link
Owner

@baurmatt: could you please resolve conflicts as I made few changes to repository?

sorrison pushed a commit to NeCTAR-RC/puppet-wireguard that referenced this pull request Apr 6, 2025
add option to purge unknown wg keys
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