mirror of
https://git.fsfe.org/fsfe-system-hackers/innernet-playbook.git
synced 2024-11-07 15:23:59 +01:00
add client role
This commit is contained in:
parent
3f55038342
commit
f06984cfb1
BIN
roles/client/files/innernet
Executable file
BIN
roles/client/files/innernet
Executable file
Binary file not shown.
39
roles/client/tasks/main.yml
Normal file
39
roles/client/tasks/main.yml
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
# 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 }}"
|
Loading…
Reference in New Issue
Block a user