Set facts is working! Now do the same for service names.
This commit is contained in:
parent
ae67a56d67
commit
021730c90c
28
facts/service_names.yml
Normal file
28
facts/service_names.yml
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
---
|
||||||
|
# Define what the program name is on each OS so we can use package builtin. like this:
|
||||||
|
|
||||||
|
- name: Set Pop!_OS Service Names
|
||||||
|
ansible.builtin.set_fact:
|
||||||
|
cups: cups
|
||||||
|
cups_pattern: cupsd
|
||||||
|
cups_browse: cups-browsed
|
||||||
|
cups_browse_pattern: cups-browsed
|
||||||
|
when: ansible_distribution == "Pop!_OS"
|
||||||
|
|
||||||
|
|
||||||
|
- name: Set Ubuntu Service Names
|
||||||
|
ansible.builtin.set_fact:
|
||||||
|
cups: cups
|
||||||
|
cups_pattern: cupsd
|
||||||
|
cups_browse: cups-browsed
|
||||||
|
cups_browse_pattern: cups-browsed
|
||||||
|
when: ansible_distribution == "Ubuntu"
|
||||||
|
|
||||||
|
|
||||||
|
- name: Set FreeBSD Service Names
|
||||||
|
ansible.builtin.set_fact:
|
||||||
|
cups: cups
|
||||||
|
cups_pattern: cupsd
|
||||||
|
cups_browse: cups-browsed
|
||||||
|
cups_browse_pattern: cups-browsed
|
||||||
|
when: ansible_distribution == "FreeBSD"
|
@ -7,7 +7,8 @@
|
|||||||
become: true
|
become: true
|
||||||
|
|
||||||
pre_tasks:
|
pre_tasks:
|
||||||
- include: facts/package_name.yml
|
- include: facts/package_names.yml
|
||||||
|
- include: facts/service_names.yml
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- include: tasks/users.yml
|
- include: tasks/users.yml
|
||||||
|
@ -10,13 +10,7 @@
|
|||||||
method: system
|
method: system
|
||||||
flatpakrepo_url: https://dl.flathub.org/repo/flathub.flatpakrepo
|
flatpakrepo_url: https://dl.flathub.org/repo/flathub.flatpakrepo
|
||||||
|
|
||||||
- name: Remove packages that may come with an OS but are being installed as Flatpak
|
# Hop into installs
|
||||||
package:
|
|
||||||
name:
|
|
||||||
- "{{ firefox }}"
|
|
||||||
- "{{ thunderbird }}"
|
|
||||||
state: absent
|
|
||||||
|
|
||||||
- name: Install Discord
|
- name: Install Discord
|
||||||
flatpak:
|
flatpak:
|
||||||
name: com.discordapp.Discord
|
name: com.discordapp.Discord
|
||||||
@ -33,3 +27,10 @@
|
|||||||
flatpak:
|
flatpak:
|
||||||
name: org.mozilla.Thunderbird
|
name: org.mozilla.Thunderbird
|
||||||
|
|
||||||
|
# Remove any applicable repo software
|
||||||
|
- name: Remove packages that may come with an OS but were just installed as Flatpak
|
||||||
|
package:
|
||||||
|
name:
|
||||||
|
- "{{ firefox }}"
|
||||||
|
- "{{ thunderbird }}"
|
||||||
|
state: absent
|
@ -1,13 +1,13 @@
|
|||||||
- name: Remove CUPS Daemon
|
- name: Remove CUPS Daemon
|
||||||
service:
|
service:
|
||||||
name: cups
|
name: "{{ cups }}"
|
||||||
pattern: cupsd
|
pattern: "{{ cups_pattern }}"
|
||||||
state: stopped
|
state: stopped
|
||||||
enabled: no
|
enabled: no
|
||||||
|
|
||||||
- name: Remove CUPS-Browse Daemon
|
- name: Remove CUPS-Browse Daemon
|
||||||
service:
|
service:
|
||||||
name: cups-browsed
|
name: "{{ cups_browse }}"
|
||||||
pattern: cups-browsed
|
pattern: "{{ cups_browse_pattern }}"
|
||||||
state: stopped
|
state: stopped
|
||||||
enabled: no
|
enabled: no
|
||||||
|
Loading…
x
Reference in New Issue
Block a user