Skip to content

Commit

Permalink
feat: support amazon linux 2023 (#308)
Browse files Browse the repository at this point in the history
* feat: support amazon linux 2023

* fix: add missing filtering change to uninstall

* remove testing trigger
  • Loading branch information
artis3n authored Apr 3, 2023
1 parent e217453 commit 93a6166
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 16 deletions.
1 change: 1 addition & 0 deletions .github/workflows/pull_request_target.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
fail-fast: false
matrix:
include:
- image: ghcr.io/artis3n/docker-amazonlinux2023-ansible:latest
- image: geerlingguy/docker-rockylinux8-ansible:latest
- image: geerlingguy/docker-rockylinux9-ansible:latest
- image: ghcr.io/artis3n/docker-almalinux8-ansible:latest
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Supported operating systems:
- Debian / Ubuntu
- CentOS / RedHat
- Rocky Linux / AlmaLinux
- Amazon Linux 2
- Amazon Linux 2 / Amazon Linux 2023
- Oracle Linux
- Fedora
- Arch Linux
Expand Down
1 change: 1 addition & 0 deletions meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ galaxy_info:
versions:
- "7"
- "8"
# Need to add an Amazon Linux 2023 platform, but Galaxy doesn't have a supported platform for it yet.
- name: Amazon Linux 2
versions:
- "all"
Expand Down
17 changes: 8 additions & 9 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "artis3n.tailscale"
version = "3.5.0"
version = "4.1.0"
description = "Ansible role to install and enable a Tailscale node."
authors = ["Artis3n <[email protected]>"]
license = "MIT"
Expand Down
8 changes: 6 additions & 2 deletions tasks/install.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
---
- name: Install | CentOS and related families
when: ansible_distribution in tailscale_centos_family_distros
when: >
ansible_distribution in tailscale_centos_family_distros
or (ansible_distribution == 'Amazon' and ansible_distribution_major_version | int < 2023)
ansible.builtin.include_tasks: centos/install.yml

- name: Install | Debian and related families
when: ansible_distribution in tailscale_debian_family_distros
ansible.builtin.include_tasks: debian/install.yml

- name: Install | Fedora and related families
when: ansible_distribution == 'Fedora'
when: >
ansible_distribution == 'Fedora'
or (ansible_distribution == 'Amazon' and ansible_distribution_major_version | int >= 2023)
ansible.builtin.include_tasks: fedora/install.yml

- name: Install | Arch
Expand Down
8 changes: 6 additions & 2 deletions tasks/uninstall.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,19 @@
when: tailscale_service in ansible_facts.services

- name: Uninstall | CentOS and related families
when: ansible_distribution in tailscale_centos_family_distros
when: >
ansible_distribution in tailscale_centos_family_distros
or (ansible_distribution == 'Amazon' and ansible_distribution_major_version | int < 2023)
ansible.builtin.include_tasks: centos/uninstall.yml

- name: Uninstall | Debian and related families
when: ansible_distribution in tailscale_debian_family_distros
ansible.builtin.include_tasks: debian/uninstall.yml

- name: Uninstall | Fedora and related families
when: ansible_distribution == 'Fedora'
when: >
ansible_distribution == 'Fedora'
or (ansible_distribution == 'Amazon' and ansible_distribution_major_version | int >= 2023)
ansible.builtin.include_tasks: fedora/uninstall.yml

- name: Uninstall | Arch
Expand Down
2 changes: 1 addition & 1 deletion vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ tailscale_debian_family_distros:

tailscale_centos_family_distros:
- CentOS
- Amazon
- OracleLinux
- RedHat
- Rocky
Expand Down Expand Up @@ -61,6 +60,7 @@ tailscale_dnf_plugins:
- dnf-plugins-core

tailscale_dnf_repos:
Amazon: https://pkgs.tailscale.com/{{ release_stability | lower }}/fedora/tailscale.repo
Fedora: https://pkgs.tailscale.com/{{ release_stability | lower }}/fedora/tailscale.repo

tailscale_opensuse_leap_repository: "https://pkgs.tailscale.com/stable/opensuse/leap/{{ ansible_distribution_version }}/tailscale.repo"
Expand Down

0 comments on commit 93a6166

Please sign in to comment.