infra-ansible

ansible script to ship alpine/ssh/wireguard

git clone https://9o.is/git/infra-ansible.git

commit 15b82020df4f713e87d5708e63e3f98d62d02ee0
parent b05191221bc4971c37d6d235c659968ec2be412b
Author: Jul <jul@9o.is>
Date:   Wed, 15 May 2024 21:30:37 +0800

connect local wireguard with ip to avoid /etc/hosts

Diffstat:
Mhost/roles/wireguard/tasks/client.yml | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/host/roles/wireguard/tasks/client.yml b/host/roles/wireguard/tasks/client.yml @@ -52,7 +52,7 @@ - option: AllowedIPs value: '{{ wg_server_ip }}/32' - option: Endpoint - value: '{{ ansible_nodename }}:{{ wireguard_port }}' + value: '{{ ansible_default_ipv4.address }}:{{ wireguard_port }} # {{ ansible_nodename }}' - option: PersistentKeepalive value: 25 notify: restart client wireguard