Commit graph

12 commits

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
2023-03-01 22:38:35 +01:00
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
2022-05-05 00:03:25 +02:00
Robert Wimmer
2b3c878715
honor wireguard_save_config value (#149)
* honor wireguard_save_config value

* update CHANGELOG
2022-02-17 22:55:25 +01:00
Anes Belfodil
840f56262d
Remove unnecessary and buggy check preventing proper port from being set in peers (#112) 2022-01-16 20:53:58 +01:00
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
2022-01-14 23:43:04 +01:00
Jamison Lofthouse
a41231675f
Check if wireguard_endpoint exists before checking if it is empty (#92) 2021-04-08 23:18:05 +02:00
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
2020-10-12 23:07:02 +02:00
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
2020-10-11 23:04:28 +02:00
Robin Schneider
739c9de73e
Move wireguard_ip template code to template where it belongs
Instead of redundant set_fact task.
2020-09-23 23:16:24 +02:00
Robin Schneider
3362f1c2fc
Consistent use of spaces in Jinja2 print expressions 2020-09-23 23:16:23 +02:00
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.
2020-09-23 23:16:23 +02:00
Robin Schneider
713a7683ef
Move template into it’s fhs place 2020-09-23 23:15:30 +02:00