mirror of
https://git.fsfe.org/fsfe-system-hackers/innernet-playbook.git
synced 2024-12-05 04:50:39 +01:00
40 lines
904 B
YAML
40 lines
904 B
YAML
# SPDX-FileCopyrightText: 2021 Free Software Foundation Europe <https://fsfe.org>
|
|
#
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
---
|
|
- name: Install needed packages
|
|
apt:
|
|
package:
|
|
- rsync
|
|
- wireguard
|
|
- wireguard-tools
|
|
|
|
- name: Copy binary to server (innernet)
|
|
synchronize:
|
|
src: "server"
|
|
dest: "/usr/bin/innernet"
|
|
|
|
- name: Create alias ("inn")
|
|
lineinfile:
|
|
path: "/root/.bashrc"
|
|
line: '"alias inn="innernet"'
|
|
|
|
- name: Copy non-admin invitation to servers
|
|
synchronize:
|
|
src: "{{ item.name }}.toml"
|
|
dest: "/home/root/{{ item.name }}.toml"
|
|
loop: "{{ peers }}"
|
|
when:
|
|
- item.cidr == "machines"
|
|
- item.name in "{{ ansible_host }}"
|
|
|
|
- name: Install non-admin invitation on servers
|
|
shell: |
|
|
innernet install {{ item.name }}.toml \
|
|
--yes
|
|
loop: "{{ peers }}"
|
|
when:
|
|
- item.cidr == "machines"
|
|
- item.name in "{{ ansible_host }}"
|