option wireguard_update_cache to disable refresh

previously disable the cache update was only possible on ubuntu
using the generic name wireguard_update_cache it can be enabled for all
operating systems
master
Sebastian Wagner 2 years ago
parent c6159d4205
commit 314fec5248
No known key found for this signature in database
GPG Key ID: 1AF10AF3B3917AB2

@ -5,6 +5,10 @@ SPDX-License-Identifier: GPL-3.0-or-later
# Changelog # Changelog
## 13.1.0
- new variable `wireguard_update_cache` to control if package manager caches should be updated before the installation (https://github.com/githubixx/ansible-role-wireguard/pull/179)
- variable `wireguard_ubuntu_update_cache` is deprecated and will be removed in the next release
## 13.0.1 ## 13.0.1
- [fix](https://github.com/githubixx/ansible-role-wireguard/pull/182) in README - [fix](https://github.com/githubixx/ansible-role-wireguard/pull/182) in README

@ -137,6 +137,9 @@ wireguard_interface_restart: false
# course a very sensitive value you might consider a tool like Ansible Vault # course a very sensitive value you might consider a tool like Ansible Vault
# to store it encrypted. # to store it encrypted.
# wireguard_private_key: # wireguard_private_key:
# Set to "false" if package cache should not be updated
wireguard_update_cache: "true"
``` ```
There are also a few Linux distribution specific settings: There are also a few Linux distribution specific settings:
@ -148,8 +151,9 @@ There are also a few Linux distribution specific settings:
# - elementary OS # - elementary OS
####################################### #######################################
# Set to "false" if package cache should not be updated # Set to "false" if package cache should not be updated.
wireguard_ubuntu_update_cache: "true" # DEPRECATED: This variable will be removed with the next major release. Please use "wireguard_update_cache" instead.
wireguard_ubuntu_update_cache: "{{ wireguard_update_cache }}"
# Set package cache valid time # Set package cache valid time
wireguard_ubuntu_cache_valid_time: "3600" wireguard_ubuntu_cache_valid_time: "3600"

@ -74,7 +74,9 @@ wireguard_interface_restart: false
####################################### #######################################
# Set to "false" if package cache should not be updated # Set to "false" if package cache should not be updated
wireguard_ubuntu_update_cache: "true" wireguard_update_cache: "true"
# DEPRECATED: This variable will be removed with the next major release. Please use "wireguard_update_cache" instead.
wireguard_ubuntu_update_cache: "{{ wireguard_update_cache }}"
# Set package cache valid time # Set package cache valid time
wireguard_ubuntu_cache_valid_time: "3600" wireguard_ubuntu_cache_valid_time: "3600"

@ -7,7 +7,7 @@
name: name:
- epel-release - epel-release
- elrepo-release - elrepo-release
update_cache: true update_cache: "{{ wireguard_update_cache }}"
- name: (AlmaLinux 8) Ensure WireGuard DKMS package is removed - name: (AlmaLinux 8) Ensure WireGuard DKMS package is removed
ansible.builtin.yum: ansible.builtin.yum:

@ -11,12 +11,12 @@
name: name:
- epel-release - epel-release
- https://www.elrepo.org/elrepo-release-7.el7.elrepo.noarch.rpm - https://www.elrepo.org/elrepo-release-7.el7.elrepo.noarch.rpm
update_cache: true update_cache: "{{ wireguard_update_cache }}"
- name: (CentOS 7) Install yum-plugin-elrepo - name: (CentOS 7) Install yum-plugin-elrepo
ansible.builtin.yum: ansible.builtin.yum:
name: yum-plugin-elrepo name: yum-plugin-elrepo
update_cache: true update_cache: "{{ wireguard_update_cache }}"
- name: (CentOS 7) Install WireGuard packages - name: (CentOS 7) Install WireGuard packages
ansible.builtin.yum: ansible.builtin.yum:
@ -40,7 +40,7 @@
name: name:
- epel-release - epel-release
- yum-utils - yum-utils
update_cache: true update_cache: "{{ wireguard_update_cache }}"
- name: (CentOS 7) Enable CentosPlus repo - name: (CentOS 7) Enable CentosPlus repo
ansible.builtin.command: yum-config-manager --setopt=centosplus.includepkgs=kernel-plus --enablerepo=centosplus --save ansible.builtin.command: yum-config-manager --setopt=centosplus.includepkgs=kernel-plus --enablerepo=centosplus --save

@ -6,7 +6,7 @@
ansible.builtin.apt_repository: ansible.builtin.apt_repository:
repo: "deb http://deb.debian.org/debian buster-backports main" repo: "deb http://deb.debian.org/debian buster-backports main"
state: "{{ 'present' if (ansible_distribution_version | int <= 10) else 'absent' }}" state: "{{ 'present' if (ansible_distribution_version | int <= 10) else 'absent' }}"
update_cache: true update_cache: "{{ wireguard_update_cache }}"
- name: (Proxmox lxc) Install wireguard-tools. - name: (Proxmox lxc) Install wireguard-tools.
ansible.builtin.apt: ansible.builtin.apt:

@ -8,7 +8,7 @@
ansible.builtin.apt_repository: ansible.builtin.apt_repository:
repo: "deb http://deb.debian.org/debian buster-backports main" repo: "deb http://deb.debian.org/debian buster-backports main"
state: "{{ 'present' if (ansible_distribution_version | int <= 10) else 'absent' }}" state: "{{ 'present' if (ansible_distribution_version | int <= 10) else 'absent' }}"
update_cache: true update_cache: "{{ wireguard_update_cache }}"
- name: (Proxmox) Install kernel headers for the currently running kernel to compile WireGuard with DKMS - name: (Proxmox) Install kernel headers for the currently running kernel to compile WireGuard with DKMS
ansible.builtin.apt: ansible.builtin.apt:

@ -27,7 +27,7 @@
ansible.builtin.apt_repository: ansible.builtin.apt_repository:
repo: "deb http://deb.debian.org/debian buster-backports main" repo: "deb http://deb.debian.org/debian buster-backports main"
state: present state: present
update_cache: true update_cache: "{{ wireguard_update_cache }}"
- name: (Raspbian) Install latest kernel - name: (Raspbian) Install latest kernel
ansible.builtin.apt: ansible.builtin.apt:

@ -8,3 +8,4 @@
name: name:
- "wireguard" - "wireguard"
state: present state: present
update_cache: "{{ wireguard_update_cache }}"

@ -11,7 +11,7 @@
name: name:
- epel-release - epel-release
- elrepo-release - elrepo-release
update_cache: true update_cache: "{{ wireguard_update_cache }}"
- name: (Rocky Linux 8) Ensure WireGuard DKMS package is removed - name: (Rocky Linux 8) Ensure WireGuard DKMS package is removed
ansible.builtin.yum: ansible.builtin.yum:
@ -40,7 +40,7 @@
ansible.builtin.yum: ansible.builtin.yum:
name: name:
- epel-release - epel-release
update_cache: true update_cache: "{{ wireguard_update_cache }}"
- name: (Rocky Linux 8) Ensure WireGuard KMOD package is removed - name: (Rocky Linux 8) Ensure WireGuard KMOD package is removed
ansible.builtin.yum: ansible.builtin.yum:

Loading…
Cancel
Save