summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2018-07-05 18:02:11 +0200
committerSuren A. Chilingaryan <csa@suren.me>2018-07-05 18:02:11 +0200
commit9194983c4daf6f0e16aa382bc903b6c092d08830 (patch)
tree224f2dd89921feeb35e205676a8b08c1c9c86d87
parent650d022653e778face2bad7527a137ad9127c236 (diff)
downloaditm-9194983c4daf6f0e16aa382bc903b6c092d08830.tar.gz
itm-9194983c4daf6f0e16aa382bc903b6c092d08830.tar.bz2
itm-9194983c4daf6f0e16aa382bc903b6c092d08830.tar.xz
itm-9194983c4daf6f0e16aa382bc903b6c092d08830.zip
Reconfigure Desktop role
-rw-r--r--roles/desktop/defaults/main.yml4
-rw-r--r--roles/desktop/tasks/Fedora.yml4
-rw-r--r--roles/desktop/tasks/main.yml12
3 files changed, 14 insertions, 6 deletions
diff --git a/roles/desktop/defaults/main.yml b/roles/desktop/defaults/main.yml
index 8808c12..e898e3c 100644
--- a/roles/desktop/defaults/main.yml
+++ b/roles/desktop/defaults/main.yml
@@ -1,3 +1,3 @@
---
-debian_desktop: []
-redhat_desktop: []
+debian_desktop: 'gnome'
+redhat_desktop: 'gnome'
diff --git a/roles/desktop/tasks/Fedora.yml b/roles/desktop/tasks/Fedora.yml
new file mode 100644
index 0000000..862514f
--- /dev/null
+++ b/roles/desktop/tasks/Fedora.yml
@@ -0,0 +1,4 @@
+---
+- name: Install Fedora Gnome desktop
+ package: name="@gnome" state=present
+ when: redhat_desktop == 'gnome' or redhat_desktop == 'gnome_shell'
diff --git a/roles/desktop/tasks/main.yml b/roles/desktop/tasks/main.yml
index fca07c5..ba2750a 100644
--- a/roles/desktop/tasks/main.yml
+++ b/roles/desktop/tasks/main.yml
@@ -1,5 +1,9 @@
---
-- include: Debian.yml
- when: ansible_os_family == 'Debian'
-- include: RedHat.yml
- when: ansible_os_family == 'RedHat'
+- include_tasks: Debian.yml
+ when: ansible_os_family | lower == 'debian'
+
+- include_tasks: Fedora.yml
+ when: ansible_distribution | lower == 'fedora'
+
+- include_tasks: RedHat.yml
+ when: (ansible_os_family | lower == 'redhat') and (ansible_distribution | lower != 'fedora')