remove old peer invitation file before creating a new one

This commit is contained in:
max.mehl 2022-03-04 11:08:26 +01:00
parent b80a889cc6
commit 5840d63293
No known key found for this signature in database
GPG Key ID: 2704E4AB371E2E92

View File

@ -2,6 +2,11 @@
# #
# SPDX-License-Identifier: AGPL-3.0-or-later # SPDX-License-Identifier: AGPL-3.0-or-later
--- ---
- name: Make sure peer invitation does not exist before creating a new one
file:
path: "/root/{{ peer_name }}.toml"
state: absent
- name: Add innernet peer on server - name: Add innernet peer on server
shell: | shell: |
innernet-server add-peer "{{ network_name }}" \ innernet-server add-peer "{{ network_name }}" \
@ -23,8 +28,8 @@
- name: Delete peer invitation file on server - name: Delete peer invitation file on server
file: file:
state: absent
path: "/root/{{ peer_name }}.toml" path: "/root/{{ peer_name }}.toml"
state: absent
- name: Inform about invitation file - name: Inform about invitation file
debug: debug: