Commit Graph

12 Commits (13.0.1)

Author SHA1 Message Date
Mathéo Cimbaro dd64b7bf2a
Allow to use multiple addresses and added IPv6 support (#174)
* Basic IPv6 support

Hosts can now have one IPv6, by specifying 'wireguard_address_v6' variable. This IP is added to peer's AllowedIPs.

Future plans :
- Support IPv6 only hosts (No 'wireguard_address')
- Allow the endpoint to be an IPv6 address

* Added 'wireguard_addresses' to use multiple IPs

Added the 'wireguard_addresses' variable to specify an array of IPv4 and IPv6. The old 'wireguard_address' variable can be deprecated even she still work to specify one IPv4.

The 'wireguard_address_v6' from last commit was deleted.

* Updating the README to use `wireguard_addresses`

* 13.0.0 changelog
2 years ago
Robert Wimmer 4e5adac691
Change restart handling / add very basic unit test (#156)
* move register if config/private key handling out of wg subcommands block

* allow user to specify WireGuard interface restart behavior

* update README

* numeric values in meta/main.yml should be strings

* update Copyright

* fix indentation in tasks/setup-debian.yml

* update Copyright

* update Copyright

* truthy values should be lowercase

* add namespace key again to meta/main.yml

* add molecule/kvm/verify.yml with a very basic unit test
3 years ago
Robert Wimmer 2b3c878715
honor wireguard_save_config value (#149)
* honor wireguard_save_config value

* update CHANGELOG
3 years ago
Anes Belfodil 840f56262d
Remove unnecessary and buggy check preventing proper port from being set in peers (#112) 3 years ago
Felix Mai c4a5677f72
General improvements (#138)
* Rearrange hooks to match lifecycle order

* Fully qualify module names

BREAKING CHANGE: To use FQCNs at least Ansible 2.9 is required [2].

From the commonly presented note in the Ansible documentation, e. g.
of Ansible's builtin debug module [1]:

  [...] we recommend you use the FQCN for easy linking to the module
  documentation and to avoid conflicting with other collections that
  may have the same module name.

[1]: https://docs.ansible.com/ansible/latest/collections/ansible/builtin/debug_module.html
[2]: https://docs.ansible.com/ansible/latest/reference_appendices/faq.html#where-did-all-the-modules-go

* Update changelog
3 years ago
Jamison Lofthouse a41231675f
Check if wireguard_endpoint exists before checking if it is empty (#92) 4 years ago
Julien Reichardt c0e3e13e0a
Add wireguard_private_key variable (#69)
* Fix check mode for Debian

* Add wireguard_private_key variable

* Release 7.6.0

* Fix undefined `wg_syncconf` when using tags
4 years ago
Robin Schneider db8bec1b0a
REUSE Specification v3.0 and other minor stuff (#76)
* Add editor fold sections

* Remove trailing whitespace

* Make the repo compliant with REUSE Specification v3.0

Closes: #71

Email addresses have all been removed from this commit as requested by
githubixx.

* Use common namespace "wireguard" for role facts

* Fix typo

* Explicitly state that GPL-3.0-or-later applies

Closes: #72
4 years ago
Robin Schneider 739c9de73e
Move wireguard_ip template code to template where it belongs
Instead of redundant set_fact task.
4 years ago
Robin Schneider 3362f1c2fc
Consistent use of spaces in Jinja2 print expressions 4 years ago
Robin Schneider 132c59521a
Drop redundant use of `hostvars[inventory_hostname].` prefix
Those variables are directly in the namespace. Using the long form is
uncommon. A case could have been made if the later section of the config
(which uses `hostvars[host]`) has similar semantics but that is not the
case as those are peer sections.
4 years ago
Robin Schneider 713a7683ef
Move template into it’s fhs place 4 years ago