k8s-playground/setup/templates/wg-k8s.conf

25 lines
848 B
Plaintext

[Interface]
PrivateKey = {{ wg_secret_key }}
ListenPort = 51820
[Peer]
Endpoint = {{ hostvars['cluster-control01'].ansible_ssh_host }}:51820
PublicKey = {{ hostvars['cluster-control01'].wg_public_key }}
AllowedIPs = {{ hostvars['cluster-control01'].wg_ip }}/32
[Peer]
Endpoint = {{ hostvars['cluster-worker01'].ansible_ssh_host }}:51820
PublicKey = {{ hostvars['cluster-worker01'].wg_public_key }}
AllowedIPs = {{ hostvars['cluster-worker01'].wg_ip }}/32
[Peer]
Endpoint = {{ hostvars['cluster-worker02'].ansible_ssh_host }}:51820
PublicKey = {{ hostvars['cluster-worker02'].wg_public_key }}
AllowedIPs = {{ hostvars['cluster-worker02'].wg_ip }}/32
[Peer]
Endpoint = {{ hostvars['cluster-worker03'].ansible_ssh_host }}:51820
PublicKey = {{ hostvars['cluster-worker03'].wg_public_key }}
AllowedIPs = {{ hostvars['cluster-worker03'].wg_ip }}/32