From f76fcf2cc9dd0d7b2fbb45dd5f6dc43c8c0ae6b9 Mon Sep 17 00:00:00 2001 From: Emil Miler Date: Wed, 4 Dec 2024 11:09:44 +0100 Subject: [PATCH] =?UTF-8?q?Crate=20role=20for=20Bakal=C3=A1=C5=99i?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- roles/bakalari/defaults/main.yaml | 4 ++++ .../bakalari/files}/bakalari.desktop | 0 .../bakalari/files}/bakalari.png | Bin roles/bakalari/tasks/main.yaml | 21 ++++++++++++++++++ setup.yaml | 7 +++--- 5 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 roles/bakalari/defaults/main.yaml rename {files/bakalari => roles/bakalari/files}/bakalari.desktop (100%) rename {files/bakalari => roles/bakalari/files}/bakalari.png (100%) create mode 100644 roles/bakalari/tasks/main.yaml diff --git a/roles/bakalari/defaults/main.yaml b/roles/bakalari/defaults/main.yaml new file mode 100644 index 0000000..4a9b48d --- /dev/null +++ b/roles/bakalari/defaults/main.yaml @@ -0,0 +1,4 @@ +bakalari_desktop_src: bakalari.desktop +bakalari_desktop_dest: /usr/share/applications/bakalari.desktop +bakalari_icon_src: bakalari.png +bakalari_icon_dest: /usr/share/icons/bakalari.png diff --git a/files/bakalari/bakalari.desktop b/roles/bakalari/files/bakalari.desktop similarity index 100% rename from files/bakalari/bakalari.desktop rename to roles/bakalari/files/bakalari.desktop diff --git a/files/bakalari/bakalari.png b/roles/bakalari/files/bakalari.png similarity index 100% rename from files/bakalari/bakalari.png rename to roles/bakalari/files/bakalari.png diff --git a/roles/bakalari/tasks/main.yaml b/roles/bakalari/tasks/main.yaml new file mode 100644 index 0000000..49c5122 --- /dev/null +++ b/roles/bakalari/tasks/main.yaml @@ -0,0 +1,21 @@ +- name: Ensure the applications directory exists + file: + path: /usr/share/applications + state: directory + +- name: Ensure the icons directory exists + file: + path: /usr/share/icons + state: directory + +- name: Copy Bakaláři desktop shortcut + copy: + src: bakalari.desktop + dest: /usr/share/applications/bakalari.desktop + mode: 0644 + +- name: Copy Bakaláři icon + copy: + src: bakalari.png + dest: /usr/share/icons/bakalari.png + mode: 0644 diff --git a/setup.yaml b/setup.yaml index 67dd4db..fe5ed27 100644 --- a/setup.yaml +++ b/setup.yaml @@ -266,9 +266,8 @@ loop: - "files/firefox/uBlock0@raymondhill.net.xpi" + - name: Bakaláři hosts: teachers - tasks: - - name: Bakaláři - include_role: - name: bakalari + roles: + - bakalari