mirror of
https://git.fsfe.org/fsfe-system-hackers/innernet-playbook.git
synced 2024-11-25 16:13:11 +01:00
27 lines
783 B
YAML
27 lines
783 B
YAML
|
# SPDX-FileCopyrightText: 2021 Free Software Foundation Europe <https://fsfe.org>
|
||
|
#
|
||
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||
|
---
|
||
|
- name: Add innernet peer on server
|
||
|
shell: |
|
||
|
innernet-server add-peer "{{ network_name }}" \
|
||
|
--name "{{ peer_name }}" \
|
||
|
--cidr "{{ peer_cidr }}" \
|
||
|
--admin "{{ peer_admin | lower }}" \
|
||
|
--save-config "/root/{{ peer_name }}.toml" \
|
||
|
--invite-expires "14d" \
|
||
|
--auto-ip \
|
||
|
--yes
|
||
|
|
||
|
- name: Copy peer invitation file from server to controller
|
||
|
fetch:
|
||
|
src: "/root/{{ peer_name }}.toml"
|
||
|
dest: "{{ playbook_dir }}/roles/client/files/{{ peer_name }}.toml"
|
||
|
flat: yes
|
||
|
fail_on_missing: yes
|
||
|
|
||
|
- name: Delete peer invitation file on server
|
||
|
file:
|
||
|
state: absent
|
||
|
path: "/root/{{ peer_name }}.toml"
|