Commit 4bcc62b5 authored by nanahira's avatar nanahira

update

parent 1669436f
...@@ -3,16 +3,23 @@ ...@@ -3,16 +3,23 @@
roles: roles:
- wireguard - wireguard
tasks: tasks:
- name: install bird - name: apt
apt: apt:
name: bird2 update_cache: yes
name: bird2,tar,curl,wget
state: latest state: latest
when: ansible_os_family == "Debian" when: 'ansible_os_family == "Debian"'
- name: install bird - name: yum
yum: yum:
name: bird2 update_cache: yes
name: bird2,tar,curl,wget
state: latest 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 - name: frp directory
file: file:
path: /tmp/frp path: /tmp/frp
...@@ -25,7 +32,10 @@ ...@@ -25,7 +32,10 @@
- /tmp/frp/frpc - /tmp/frp/frpc
- /tmp/frp/frps - /tmp/frp/frps
dest: /tmp/frp/ dest: /tmp/frp/
extra_opts:
- --strip-components=1
when: 'ansible_architecture == "x86_64"' when: 'ansible_architecture == "x86_64"'
register: unarchive_result
- name: get frp for arm - name: get frp for arm
unarchive: unarchive:
src: https://github.com/fatedier/frp/releases/download/v0.31.2/frp_0.31.2_linux_arm64.tar.gz src: https://github.com/fatedier/frp/releases/download/v0.31.2/frp_0.31.2_linux_arm64.tar.gz
...@@ -37,9 +47,14 @@ ...@@ -37,9 +47,14 @@
extra_opts: extra_opts:
- --strip-components=1 - --strip-components=1
when: 'ansible_architecture == "aarch64"' when: 'ansible_architecture == "aarch64"'
register: unarchive_result
- name: install frp - 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/' 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: file:
path: /etc/frp path: '/etc/{{item}}'
state: directory 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