summaryrefslogtreecommitdiffstats
path: root/desktop-xfce4/tasks
diff options
context:
space:
mode:
authorJonathan Bauer2021-05-19 10:26:57 +0200
committerJonathan Bauer2021-05-19 10:26:57 +0200
commit785c5e4b7c9312428862d8bb396537faa3e61b91 (patch)
treec1951e8c4e72cd7cd4d12bbf7d90a490db52a13c /desktop-xfce4/tasks
parent[tools-base] install basic tools (diff)
downloadansible-bwlp-785c5e4b7c9312428862d8bb396537faa3e61b91.tar.gz
ansible-bwlp-785c5e4b7c9312428862d8bb396537faa3e61b91.tar.xz
ansible-bwlp-785c5e4b7c9312428862d8bb396537faa3e61b91.zip
[desktop-xfce4] xfce4 with bwlp modifications
Diffstat (limited to 'desktop-xfce4/tasks')
-rw-r--r--desktop-xfce4/tasks/main.yml104
1 files changed, 104 insertions, 0 deletions
diff --git a/desktop-xfce4/tasks/main.yml b/desktop-xfce4/tasks/main.yml
new file mode 100644
index 0000000..ac78a13
--- /dev/null
+++ b/desktop-xfce4/tasks/main.yml
@@ -0,0 +1,104 @@
+---
+- name: Install XFCE4 desktop environment
+ apt:
+ name: "{{ xfce_packages }}"
+ state: present
+ install_recommends: no
+ vars:
+ xfce_packages:
+ - evince
+ - mousepad
+ - ristretto
+ - xfce4
+ - xfce4-terminal
+ - xfce4-goodies
+ - xfce4-power-manager
+ - xubuntu-icon-theme
+ - greybird-gtk-theme
+ - pavucontrol
+ - pulseaudio
+ - udisks2
+ - gvfs
+ - gvfs-backends
+ - gvfs-fuse
+ # for xml module
+ - python3-lxml
+
+# TODO: do this the proper way, when it is known how :)
+- name: HACK overwrite default wallpaper
+ find:
+ paths: /usr/share/backgrounds/xfce
+ patterns: "*"
+ register: xfce_backgrounds
+
+- name: HACK overwrite default wallpaper
+ file:
+ path: "{{ item.path }}"
+ state: absent
+ with_items: "{{ xfce_backgrounds.files }}"
+
+- name: HACK overwrite default wallpaper
+ file:
+ src: /usr/share/backgrounds/bwlp-1920x1080.png
+ dest: "{{ item.path }}"
+ state: link
+ force: yes
+ with_items: "{{ xfce_backgrounds.files }}"
+
+- name: Cleanup applications menu
+ file:
+ path: "{{ item }}"
+ state: absent
+ with_items:
+ - /usr/share/applications/exo-mail-reader.desktop
+ - /usr/share/applications/assistant-qt5.desktop
+ - /usr/share/applications/designer-qt5.desktop
+ - /usr/share/applications/linguist-qt5.desktop
+ - /usr/share/applications/globaltime.desktop
+ - /usr/share/applications/xfcalendar.desktop
+
+- name: Copy distro's specific static files
+ copy:
+ src: "files/{{ ansible_distribution_version }}/"
+ dest: /
+ become: yes
+
+# disable logout menu items
+- name: Configure xfce4 logout menu | probe shutdown node
+ xml:
+ path: /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml
+ xpath: /channel/property[@name='shutdown']
+ count: yes
+ register: shutdown_nodes
+
+- name: Configure xfce4 logout menu | check shutdown node
+ debug:
+ var: shutdown_nodes.count
+
+- name: Configure xfce4 logout menu | add shutdown node if missing
+ xml:
+ path: /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml
+ xpath: /channel
+ add_children:
+ - property:
+ name: "shutdown"
+ type: "empty"
+ pretty_print: yes
+ when: shutdown_nodes.count == 0
+
+- name: Configure xfce4 logout menu | disable suspend and hibernate
+ xml:
+ path: /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-session.xml
+ xpath: /channel/property[@name='shutdown']
+ add_children:
+ - property:
+ name: "ShowSuspend"
+ type: "bool"
+ value: "false"
+ - property:
+ name: "ShowHibernate"
+ type: "bool"
+ value: "false"
+ pretty_print: yes
+ when: shutdown_nodes.count == 0
+