Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

option wireguard_update_cache to disable refresh #179

Merged
merged 1 commit into from
Mar 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ SPDX-License-Identifier: GPL-3.0-or-later

# 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

- [fix](https://github.com/githubixx/ansible-role-wireguard/pull/182) in README
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ wireguard_interface_restart: false
# course a very sensitive value you might consider a tool like Ansible Vault
# to store it encrypted.
# 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:
Expand All @@ -148,8 +151,9 @@ There are also a few Linux distribution specific settings:
# - elementary OS
#######################################

# Set to "false" if package cache should not be updated
wireguard_ubuntu_update_cache: "true"
sebix marked this conversation as resolved.
Show resolved Hide resolved
# Set to "false" if package cache should not be updated.
# 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
wireguard_ubuntu_cache_valid_time: "3600"
Expand Down
4 changes: 3 additions & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ wireguard_interface_restart: false
#######################################

# Set to "false" if package cache should not be updated
wireguard_ubuntu_update_cache: "true"
wireguard_update_cache: "true"
sebix marked this conversation as resolved.
Show resolved Hide resolved
# 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
wireguard_ubuntu_cache_valid_time: "3600"
Expand Down
2 changes: 1 addition & 1 deletion tasks/setup-almalinux-8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
name:
- epel-release
- elrepo-release
update_cache: true
update_cache: "{{ wireguard_update_cache }}"

- name: (AlmaLinux 8) Ensure WireGuard DKMS package is removed
ansible.builtin.yum:
Expand Down
6 changes: 3 additions & 3 deletions tasks/setup-centos-7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
name:
- epel-release
- 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
ansible.builtin.yum:
name: yum-plugin-elrepo
update_cache: true
update_cache: "{{ wireguard_update_cache }}"

- name: (CentOS 7) Install WireGuard packages
ansible.builtin.yum:
Expand All @@ -40,7 +40,7 @@
name:
- epel-release
- yum-utils
update_cache: true
update_cache: "{{ wireguard_update_cache }}"

- name: (CentOS 7) Enable CentosPlus repo
ansible.builtin.command: yum-config-manager --setopt=centosplus.includepkgs=kernel-plus --enablerepo=centosplus --save
Expand Down
2 changes: 1 addition & 1 deletion tasks/setup-debian-pve-guest-variant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
ansible.builtin.apt_repository:
repo: "deb http://deb.debian.org/debian buster-backports main"
state: "{{ 'present' if (ansible_distribution_version | int <= 10) else 'absent' }}"
update_cache: true
update_cache: "{{ wireguard_update_cache }}"

- name: (Proxmox lxc) Install wireguard-tools.
ansible.builtin.apt:
Expand Down
2 changes: 1 addition & 1 deletion tasks/setup-debian-pve-host-variant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
ansible.builtin.apt_repository:
repo: "deb http://deb.debian.org/debian buster-backports main"
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
ansible.builtin.apt:
Expand Down
2 changes: 1 addition & 1 deletion tasks/setup-debian-raspbian-buster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
ansible.builtin.apt_repository:
repo: "deb http://deb.debian.org/debian buster-backports main"
state: present
update_cache: true
update_cache: "{{ wireguard_update_cache }}"

- name: (Raspbian) Install latest kernel
ansible.builtin.apt:
Expand Down
1 change: 1 addition & 0 deletions tasks/setup-debian-vanilla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
name:
- "wireguard"
state: present
update_cache: "{{ wireguard_update_cache }}"
4 changes: 2 additions & 2 deletions tasks/setup-rocky-8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
name:
- epel-release
- elrepo-release
update_cache: true
update_cache: "{{ wireguard_update_cache }}"

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

- name: (Rocky Linux 8) Ensure WireGuard KMOD package is removed
ansible.builtin.yum:
Expand Down