Add role for media tools
This commit is contained in:
parent
92164a24dc
commit
0cd88bdd69
3
main.yml
3
main.yml
|
@ -2,4 +2,5 @@
|
||||||
roles:
|
roles:
|
||||||
- common
|
- common
|
||||||
- desktop-environment
|
- desktop-environment
|
||||||
- essential-tools # Thunar File Manager, Firefox, KeePassXC, Nextcloud Desktop
|
- essential-tools # Thunar File Manager, Firefox, KeePassXC, Nextcloud Desktop
|
||||||
|
#- media-tools # Spotify, VLC
|
11
roles/media-tools/files/spotify.desktop
Normal file
11
roles/media-tools/files/spotify.desktop
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Type=Application
|
||||||
|
Name=Spotify
|
||||||
|
GenericName=Music Player
|
||||||
|
Icon=spotify-client
|
||||||
|
TryExec=spotify
|
||||||
|
Exec=spotify --uri=%U
|
||||||
|
Terminal=false
|
||||||
|
MimeType=x-scheme-handler/spotify;
|
||||||
|
Categories=Audio;Music;Player;AudioVideo;
|
||||||
|
StartupWMClass=spotify
|
35
roles/media-tools/tasks/main.yml
Normal file
35
roles/media-tools/tasks/main.yml
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
- name: Add Spotify repository
|
||||||
|
block:
|
||||||
|
- name: Add Spotify signing key
|
||||||
|
become: yes
|
||||||
|
ansible.builtin.get_url:
|
||||||
|
url: https://download.spotify.com/debian/pubkey_7A3A762FAFD4A51F.gpg
|
||||||
|
dest: /etc/apt/trusted.gpg.d/spotify.gpg
|
||||||
|
|
||||||
|
- name: Add Spotify repository
|
||||||
|
become: yes
|
||||||
|
ansible.builtin.apt_repository:
|
||||||
|
repo: "deb http://repository.spotify.com stable non-free"
|
||||||
|
state: present
|
||||||
|
filename: spotify
|
||||||
|
|
||||||
|
- name: Install packages
|
||||||
|
become: yes
|
||||||
|
apt:
|
||||||
|
state: latest
|
||||||
|
install_recommends: false
|
||||||
|
name:
|
||||||
|
- vlc
|
||||||
|
- vlc-plugin-pipewire
|
||||||
|
- spotify
|
||||||
|
|
||||||
|
- name: Ensure that directory for desktop entries exists
|
||||||
|
file:
|
||||||
|
path: "{{ ansible_env.HOME }}/.local/share/applications"
|
||||||
|
recurse: yes
|
||||||
|
state: directory
|
||||||
|
|
||||||
|
- name: Create Spotify desktop entry
|
||||||
|
copy:
|
||||||
|
src: "{{ role_path }}/files/spotify.desktop"
|
||||||
|
dest: "{{ ansible_env.HOME }}/.local/share/applications/spotify.desktop"
|
Loading…
Reference in a new issue