summaryrefslogtreecommitdiffstats
path: root/roles/gnome-papers/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'roles/gnome-papers/tasks')
-rw-r--r--roles/gnome-papers/tasks/install-archlinux.yml6
-rw-r--r--roles/gnome-papers/tasks/install-debian.yml7
-rw-r--r--roles/gnome-papers/tasks/main.yml8
3 files changed, 21 insertions, 0 deletions
diff --git a/roles/gnome-papers/tasks/install-archlinux.yml b/roles/gnome-papers/tasks/install-archlinux.yml
new file mode 100644
index 00000000..a9220d62
--- /dev/null
+++ b/roles/gnome-papers/tasks/install-archlinux.yml
@@ -0,0 +1,6 @@
+---
+- name: "Ensure gnome Papers is installed"
+ become: true
+ ansible.builtin.package:
+ name: "papers"
+ state: "present"
diff --git a/roles/gnome-papers/tasks/install-debian.yml b/roles/gnome-papers/tasks/install-debian.yml
new file mode 100644
index 00000000..dffffc7e
--- /dev/null
+++ b/roles/gnome-papers/tasks/install-debian.yml
@@ -0,0 +1,7 @@
+---
+- name: "Ensure gnome Papers is installed via flathub"
+ community.general.flatpak:
+ name: "org.gnome.Papers"
+ remote: "flathub"
+ state: "present"
+ method: "user"
diff --git a/roles/gnome-papers/tasks/main.yml b/roles/gnome-papers/tasks/main.yml
new file mode 100644
index 00000000..27bcd65c
--- /dev/null
+++ b/roles/gnome-papers/tasks/main.yml
@@ -0,0 +1,8 @@
+---
+- name: "Include OS-specific tasks"
+ ansible.builtin.include_tasks: "install-{{ ansible_facts['os_family'] | lower }}.yml"
+
+- name: "Configure xdg-mime defaults"
+ ansible.builtin.command:
+ cmd: "xdg-mime default org.gnome.Papers.desktop application/pdf"
+ changed_when: false