Reorganize gui vars and allow setting default lightdm session

Mon, 21 Sep 2015 18:48:56 -0400

author
Meredith Howard <mhoward@roomag.org>
date
Mon, 21 Sep 2015 18:48:56 -0400
changeset 2
515d87b4bfc4
parent 1
18da47fe753c
child 3
e84673846cd7

Reorganize gui vars and allow setting default lightdm session

group_vars/all.yml file | annotate | diff | comparison | revisions
roles/devbox/tasks/debian.yml file | annotate | diff | comparison | revisions
--- a/group_vars/all.yml
+++ b/group_vars/all.yml
@@ -4,7 +4,9 @@ user:
   name:    mhoward
   comment: Meredith Howard
 
-with_gui: true
+gui:
+  enabled: false
+  session: "i3"
 
 dotfiles_repository: ssh://mhoward@roomag.org/proj/dotfiles
 
--- a/roles/devbox/tasks/debian.yml
+++ b/roles/devbox/tasks/debian.yml
@@ -25,7 +25,7 @@
   tags: packages, install
 
 - name: Install GUI packages
-  when: with_gui
+  when: gui.enabled
   apt: name={{item}} state=installed
   with_items:
     - i3
@@ -41,13 +41,13 @@
   tags: packages, install
 
 
-- name: Set default X session to i3
-  when: with_gui
+- name: Set default X session in lightdm
+  when: gui.session
   ini_file:
     dest: /etc/lightdm/lightdm.conf
     section: SeatDefaults
     option: user-session
-    value: i3
+    value: "{{gui.session}}"
     backup: true
   notify:
   - restart lightdm

mercurial