Commit 7cca2df9 authored by nanahira's avatar nanahira

remove other distro of wireguard install

parent e9bfcb92
......@@ -2,43 +2,9 @@
- name: 安装软件包 (apt)
become: true
apt:
name: wireguard,ipset
name: wireguard,ipset,iproute2,iptables
update_cache: yes
when: ansible_os_family == 'Debian'
- name: WireGuard 源 (CentOS)
become: true
yum_repository:
name: wireguard
description: wireguard
baseurl: 'https://copr-be.cloud.fedoraproject.org/results/jdoss/wireguard/epel-{{ansible_distribution_major_version}}-$basearch/'
ip_resolve: 4
gpgkey: "https://copr-be.cloud.fedoraproject.org/results/jdoss/wireguard/pubkey.gpg"
when: "ansible_os_family == 'RedHat'"
- name: epel 7
become: true
yum:
state: latest
name: epel-release
when: "ansible_os_family == 'RedHat' and ansible_distribution_major_version|int <= 7"
- name: 安装软件包 (yum)
become: true
yum:
state: latest
update_cache: true
name: wireguard-tools,wireguard-dkms,ipset
when: "ansible_os_family == 'RedHat' and ansible_distribution_major_version|int <= 7"
- name: epel 8
become: true
dnf:
state: latest
name: epel-release
when: "ansible_os_family == 'RedHat' and ansible_distribution_major_version|int == 8"
- name: 安装软件包 (dnf) # Fedora自己想办法,不照顾
become: true
dnf:
state: latest
name: wireguard-tools,wireguard-dkms,ipset
when: "ansible_os_family == 'RedHat' and ansible_distribution_major_version|int == 8"
- name: config directories
file:
path: '/etc/wireguard'
......
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