Commit 4bcc62b5 authored by nanahira's avatar nanahira

update

parent 1669436f
......@@ -3,16 +3,23 @@
roles:
- wireguard
tasks:
- name: install bird
- name: apt
apt:
name: bird2
update_cache: yes
name: bird2,tar,curl,wget
state: latest
when: ansible_os_family == "Debian"
- name: install bird
when: 'ansible_os_family == "Debian"'
- name: yum
yum:
name: bird2
update_cache: yes
name: bird2,tar,curl,wget
state: latest
when: ansible_os_family == "RedHat"
when: 'ansible_os_family == "RedHat" and ansible_distribution_major_version|int < 8'
- name: dnf
dnf:
name: bird2,tar,curl,wget
state: latest
when: 'ansible_os_family == "RedHat" and ansible_distribution_major_version|int == 8'
- name: frp directory
file:
path: /tmp/frp
......@@ -25,7 +32,10 @@
- /tmp/frp/frpc
- /tmp/frp/frps
dest: /tmp/frp/
extra_opts:
- --strip-components=1
when: 'ansible_architecture == "x86_64"'
register: unarchive_result
- name: get frp for arm
unarchive:
src: https://github.com/fatedier/frp/releases/download/v0.31.2/frp_0.31.2_linux_arm64.tar.gz
......@@ -37,9 +47,14 @@
extra_opts:
- --strip-components=1
when: 'ansible_architecture == "aarch64"'
register: unarchive_result
- name: install frp
shell: 'cp -rf /tmp/frp/frpc /usr/bin/ && cp -rf /tmp/frp/frps /usr/bin/ && cp -rf /tmp/frp/systemd/* /usr/lib/systemd/systemd/'
name: frp config directory
when: 'unarchive_result.changed'
- name: config directories
file:
path: /etc/frp
path: '/etc/{{item}}'
state: directory
with_items:
- wireguard
- frp
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment