replace new lines

This commit is contained in:
Antonio J. Delgado 2023-04-06 20:34:26 +03:00
parent 4a1926a900
commit 0789d46ccb

View file

@ -46,7 +46,7 @@
path: "/var/lib/from_repos/wireguard_peers/{{ interface_name }}/{{ inventory_hostname }}.conf" path: "/var/lib/from_repos/wireguard_peers/{{ interface_name }}/{{ inventory_hostname }}.conf"
section: Peer section: Peer
option: PublicKey option: PublicKey
value: "{{ public_key }}" value: "{{ public_key | replace('\n', '')}}"
create: true create: true
backup: true backup: true
@ -73,7 +73,7 @@
args: args:
chdir: '/var/lib/from_repos/wireguard_peers/' chdir: '/var/lib/from_repos/wireguard_peers/'
- name: Ensure Wireguard client is configure - name: Ensure Wireguard client is configured
shell: "/var/lib/from_repos/wireguard_peers/update_configuration.sh '${vpnes_ip}' '${vpnes_port}'" shell: "/var/lib/from_repos/wireguard_peers/update_configuration.sh '${vpnes_ip}' '${vpnes_port}'"
- name: Restart Wireguard service - name: Restart Wireguard service
@ -83,7 +83,7 @@
enabled: yes enabled: yes
daemon_reload: yes daemon_reload: yes
# - name: Ensure Wireguard client is configure # - name: Ensure Wireguard client is configured
# template: # template:
# src: templates/wireguard_client.conf # src: templates/wireguard_client.conf
# dest: "/etc/wireguard/{{ interface_name }}.conf" # dest: "/etc/wireguard/{{ interface_name }}.conf"