Skip to content

Commit

Permalink
feat: add opensuse CI containers. configure uninstall tasks for opens…
Browse files Browse the repository at this point in the history
…use (#268)

* feat: add opensuse CI containers. configure uninstall tasks for opensuse

* uninstall, not install
  • Loading branch information
artis3n authored Dec 4, 2022
1 parent d498df2 commit 6bcfcc8
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 15 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/pull_request_target.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ jobs:
- geerlingguy/docker-debian9-ansible:latest
- geerlingguy/docker-fedora31-ansible:latest
- ghcr.io/artis3n/docker-arch-ansible:latest
- ghcr.io/artis3n/docker-opensuse-tumbleweed-ansible:latest
- ghcr.io/artis3n/docker-opensuse-leap-ansible:latest
fail-fast: false

steps:
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Supported operating systems:
- Oracle Linux
- Fedora
- Arch Linux
- OpenSUSE
- Raspbian (untested but should work through Debian support)

See the [CI worfklow](https://github.com/artis3n/ansible-role-tailscale/blob/main/.github/workflows/ci.yml#L15) for the list of distribution versions actively tested in each pull request.
Expand Down
4 changes: 2 additions & 2 deletions tasks/opensuse/install.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
- name: OpenSUE | Install Repo - Leap
- name: OpenSUE | Install Repo - TUmbleweed
become: true
community.general.zypper_repository:
repo: "{{ opensuse_tumbleweed_repository }}"
state: present
when: ansible_distribution == "openSUSE Tumbleweed"

- name: OpenSUSE | Install Repo - Tumbleweed
- name: OpenSUSE | Install Repo - Leap
become: true
community.general.zypper_repository:
repo: "{{ opensuse_leap_repository }}"
Expand Down
6 changes: 3 additions & 3 deletions tasks/opensuse/uninstall.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
- name: OpenSUE | Remove Repo - Leap
- name: OpenSUE | Remove Repo - Tumbleweed
become: true
community.general.zypper_repository:
repo: "{{ opensuse_tumbleweed_repository }}"
state: absent
when: ansible_distribution == "openSUSE Tumbleweed"

- name: OpenSUSE | Remove Repo - Tumbleweed
- name: OpenSUSE | Remove Repo - Leap
become: true
community.general.zypper_repository:
repo: "{{ opensuse_leap_repository }}"
Expand All @@ -18,4 +18,4 @@
community.general.zypper:
name: tailscale
update_cache: true
state: '{{ state }}'
state: absent
24 changes: 14 additions & 10 deletions tasks/uninstall.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,17 @@
path: "{{ ansible_env.HOME }}/.artis3n-tailscale"
state: absent

- name: Uninstall | Gather Service Facts
ansible.builtin.service_facts:

- name: Uninstall | Disable Tailscale Service
become: true
ansible.builtin.service:
name: "{{ tailscale_service }}"
state: stopped
enabled: false
when: tailscale_service in ansible_facts.services

- name: Uninstall | CentOS and related families
when: ansible_distribution in centos_family_distros
ansible.builtin.include_tasks: centos/uninstall.yml
Expand All @@ -38,13 +49,6 @@
when: ansible_distribution == 'Archlinux'
ansible.builtin.include_tasks: arch/uninstall.yml

- name: Uninstall | Gather Service Facts
ansible.builtin.service_facts:

- name: Uninstall | Disable Tailscale Service
become: true
ansible.builtin.service:
name: "{{ tailscale_service }}"
state: stopped
enabled: false
when: tailscale_service in ansible_facts.services
- name: Uninstall | OpenSUSE
when: ansible_distribution in opensuse_family_distros
ansible.builtin.include_tasks: opensuse/uninstall.yml

0 comments on commit 6bcfcc8

Please sign in to comment.