Skip to content

Commit

Permalink
Support elementary OS (#171)
Browse files Browse the repository at this point in the history
* add support for elementary OS

* update README

* add skip_ansible_lint for two tasks

* ignore two ansible-lint warnings for Raspbian Buster tasks

* update CHANGELOG

* update comment in defaults/main.yml and README
  • Loading branch information
githubixx committed Nov 30, 2022
1 parent f4573c5 commit f6a6e46
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ SPDX-License-Identifier: GPL-3.0-or-later

# Changelog

## 11.1.0

- add support for elementary OS 6
- ignore some minor linter warnings

## 11.0.0

- add support for Rocky Linux 9 (original PR from @vincentDcmps: https://github.com/githubixx/ansible-role-wireguard/pull/163)
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ This role should work with:
- openSUSE Leap 15.3
- openSUSE Leap 15.4

Best effort:

- elementary OS 6

Molecule tests are [available](https://github.com/githubixx/ansible-role-wireguard#testing) (see further down below). It should also work with `Raspbian Buster` but for this one there is no test available. MacOS (see below) should also work partitially but is only best effort.

MacOS
Expand Down Expand Up @@ -141,7 +145,9 @@ There are also a few Linux distribution specific settings:

```yaml
#######################################
# Settings only relevant for Ubuntu
# Settings only relevant for:
# - Ubuntu
# - elementary OS
#######################################

# Set to "false" if package cache should not be updated
Expand Down
4 changes: 3 additions & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ wireguard_interface_restart: false
# wireguard_private_key:

#######################################
# Settings only relevant for Ubuntu
# Settings only relevant for:
# - Ubuntu
# - elementary OS
#######################################

# Set to "false" if package cache should not be updated
Expand Down
4 changes: 4 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
{%- else -%}
false
{%- endif %}
tags:
- skip_ansible_lint

- name: Make sure wg syncconf option is available
when:
Expand Down Expand Up @@ -76,6 +78,8 @@
{%- else -%}
'syncconf'
{%- endif %}
tags:
- skip_ansible_lint

- name: Register if config/private key already exists on target host
ansible.builtin.stat:
Expand Down
4 changes: 2 additions & 2 deletions tasks/setup-debian-raspbian-buster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
ansible.builtin.apt:
name:
- "raspberrypi-kernel"
state: latest
state: latest # noqa package-latest
register: wireguard__register_kernel_update

- name: (Raspbian) Reboot after kernel update (Ansible >= 2.8)
Expand Down Expand Up @@ -76,7 +76,7 @@
ansible.builtin.apt:
name:
- "raspberrypi-kernel-headers"
state: latest
state: latest # noqa package-latest

- name: (Raspbian) Install WireGuard packages
ansible.builtin.apt:
Expand Down
13 changes: 13 additions & 0 deletions tasks/setup-elementary os.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
# Copyright (C) 2022 Robert Wimmer
# SPDX-License-Identifier: GPL-3.0-or-later

- name: (elementary OS) Update APT package cache
ansible.builtin.apt:
update_cache: "{{ wireguard_ubuntu_update_cache }}"
cache_valid_time: "{{ wireguard_ubuntu_cache_valid_time }}"

- name: (elementary OS) Install wireguard package
ansible.builtin.apt:
name: "wireguard"
state: present

0 comments on commit f6a6e46

Please sign in to comment.