summaryrefslogtreecommitdiff
path: root/roles/ws
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2020-12-23 15:43:07 +0100
committerChristian Pointner <equinox@spreadspace.org>2020-12-27 19:41:37 +0100
commit774f14cca2677b25047ccc17313acc53734bccde (patch)
treeb0aff6577cfa7298cf267a069b99cbdb2c6984c3 /roles/ws
parentws/base: allow configuration of lightdm (diff)
ws/base some more bits and pieces
Diffstat (limited to 'roles/ws')
-rw-r--r--roles/ws/base/defaults/main.yml2
-rw-r--r--roles/ws/base/handlers/main.yml7
-rw-r--r--roles/ws/base/tasks/lightdm.yml14
-rw-r--r--roles/ws/base/tasks/main.yml24
4 files changed, 35 insertions, 12 deletions
diff --git a/roles/ws/base/defaults/main.yml b/roles/ws/base/defaults/main.yml
index 91a29924..43feee9c 100644
--- a/roles/ws/base/defaults/main.yml
+++ b/roles/ws/base/defaults/main.yml
@@ -4,6 +4,8 @@
# ws_base_hide_ntfs_disks:
# - /dev/disk/by-id/ata-blub_foo-part1
+# ws_base_cleanup_tmp: 1d
+
ws_base_superflous_packages:
- gnome-keyring
- gnome-software
diff --git a/roles/ws/base/handlers/main.yml b/roles/ws/base/handlers/main.yml
new file mode 100644
index 00000000..919119e4
--- /dev/null
+++ b/roles/ws/base/handlers/main.yml
@@ -0,0 +1,7 @@
+---
+- name: restart lightdm
+ debug:
+ msg: "Lightdm needs a manual restart. This is not done automatically since any logged in user would be logged-off!"
+ # service:
+ # name: lightdm
+ # state: restarted
diff --git a/roles/ws/base/tasks/lightdm.yml b/roles/ws/base/tasks/lightdm.yml
index 0b90cdc1..57e2aeaf 100644
--- a/roles/ws/base/tasks/lightdm.yml
+++ b/roles/ws/base/tasks/lightdm.yml
@@ -2,20 +2,20 @@
- name: install lightdm default config
when: ws_base_lightdm_defaults is defined
copy:
+ dest: /etc/lightdm/lightdm.conf.d/defaults.conf
content: |
[Seat:*]
{% for option, value in ws_base_lightdm_defaults.items() %}
{{ option }}={{ value }}
{% endfor %}
- dest: /etc/lightdm/lightdm.conf.d/defaults.conf
- ## not restarting lightdm because this would logg-off any logged in user!
+ notify: restart lightdm
- name: remove lightdm default config
when: ws_base_lightdm_defaults is not defined
file:
path: /etc/lightdm/lightdm.conf.d/defaults.conf
state: absent
- ## not restarting lightdm because this would logg-off any logged in user!
+ notify: restart lightdm
- name: install xrandr setup script
@@ -23,22 +23,22 @@
block:
- name: install xrandr setup script
copy:
- content: "{{ ws_base_xrandr_setup_script }}"
dest: /usr/local/bin/xrandr-setup.sh
+ content: "{{ ws_base_xrandr_setup_script }}"
mode: 0755
- name: install xrandr setup script
copy:
+ dest: /etc/lightdm/lightdm.conf.d/xrandr-setup.conf
content: |
[Seat:*]
greeter-setup-script=/usr/local/bin/xrandr-setup.sh
session-setup-script=/usr/local/bin/xrandr-setup.sh
- dest: /etc/lightdm/lightdm.conf.d/xrandr-setup.conf
- ## not restarting lightdm because this would logg-off any logged in user!
+ notify: restart lightdm
- name: remove xrandr setup script config
when: ws_base_xrandr_setup_script is not defined
file:
path: /etc/lightdm/lightdm.conf.d/xrandr-setup.conf
state: absent
- ## not restarting lightdm because this would logg-off any logged in user!
+ notify: restart lightdm
diff --git a/roles/ws/base/tasks/main.yml b/roles/ws/base/tasks/main.yml
index 579df707..6e96eff8 100644
--- a/roles/ws/base/tasks/main.yml
+++ b/roles/ws/base/tasks/main.yml
@@ -6,6 +6,24 @@
state: present
extra_zfs_properties: "{{ ws_base_home_zfs.properties | default({}) | combine({'mountpoint': '/home'}) }}"
+- name: hide ntfs disks
+ when: ws_base_hide_ntfs_disks is defined
+ import_tasks: hide-ntfs-disks.yml
+
+- name: configure cleanup of /tmp
+ when: ws_base_cleanup_tmp is defined
+ copy:
+ dest: /etc/tmpfiles.d/00_tmp-override.conf
+ content: |
+ d /tmp/ 1777 root root {{ ws_base_cleanup_tmp }}
+
+- name: reset cleanup of /tmp to default
+ when: ws_base_cleanup_tmp is not defined
+ file:
+ path: /etc/tmpfiles.d/00_tmp-override.conf
+ state: absent
+
+
- name: prohibited packages
loop:
- flashplugin-installer
@@ -69,15 +87,11 @@
name: /etc/netplan/01-network-manager-all.yaml
state: absent
+
- name: install extra packages
apt:
name: "{{ ws_base_extra_packages }}"
state: present
-
-- name: hide ntfs disks
- when: ws_base_hide_ntfs_disks is defined
- import_tasks: hide-ntfs-disks.yml
-
- name: configure lightdm
import_tasks: lightdm.yml