diff --git a/templates/wg b/templates/wg index 3b6881df23f037d1675475b0067b8dc383537b99..8d6f7aee619e5369852c90b5cfb5b8c672531b09 100644 --- a/templates/wg +++ b/templates/wg @@ -8,4 +8,4 @@ PublicKey = {{ publickey }} Endpoint = {{ dst }}:51902 AllowedIPs = 10.0.0.0/24 -{{ hostvars }} \ No newline at end of file +{{ varsi }} \ No newline at end of file diff --git a/wg.yml b/wg.yml index b2e0f8316f58ccfead1223131e0bf3ee269ac6c4..6aebfcc07b40af572f3059b4604b4442fb2242bf 100644 --- a/wg.yml +++ b/wg.yml @@ -6,6 +6,7 @@ publickey: "{{ hostvars['h2'].publickey }}" myAddr: 10.0.0.10 dst: 10.0.3.2 + varsi: "{{ hostvars }}" - name: h2_key_set hosts: h1 @@ -15,4 +16,5 @@ publickey: "{{ hostvars['h1'].publickey }}" myAddr: 10.0.0.20 dst: 10.0.1.2 + varsi: "{{ hostvars }}"