ansible-role-wireguard icon indicating copy to clipboard operation
ansible-role-wireguard copied to clipboard

Stable config when running against a subset of the initial ansible_play_hosts

Open ypid opened this issue 5 years ago • 3 comments

The current design is modeled around ansible_play_hosts:

https://github.com/githubixx/ansible-role-wireguard/blob/fbf47d2a139f9f3dc07bb4f78392c2176ecb91ea/templates/etc/wireguard/wg.conf.j2#L44

This has one very strong downside which is that this role cannot run against one host because then it would remove all of the peers from that one host. I am currently looking into using inventory groups for this like in https://docs.debops.org/en/master/ansible/roles/tinc/index.html as part of #66. I opened this issue here because I think it is relevant for others as well. Note that there are more changes needed to solve this issue than just inventory groups.

A common thing to do is to have a "site" playbook which runs all roles against a server and which can fully deploy it. This is kinda incompatible with this role currently.

Fixed in: https://github.com/ypid/ansible-wireguard/tree/prepare-for-debops

ypid avatar Sep 26 '20 22:09 ypid

@githubixx what's preventing this from being implemented?

@ypid do you want to create a PR at some point or do you want to keep your role separately?

lucasteinke avatar Jun 28 '22 14:06 lucasteinke

@lucasteinke Mainly time :wink:

githubixx avatar Jul 03 '22 19:07 githubixx

do you want to create a PR at some point or do you want to keep your role separately?

As I was getting into this role, I took care to upstream changes in all areas where our visions aligned. You are welcome to cherry-pick from my fork if you like. The PR will not be done for you @lucasteinke ;-)

Ref: https://github.com/githubixx/ansible-role-wireguard/issues/66 and other tickets for discussion how the fork came to be.

ypid avatar Jul 03 '22 21:07 ypid