From 9194983c4daf6f0e16aa382bc903b6c092d08830 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Thu, 5 Jul 2018 18:02:11 +0200 Subject: Reconfigure Desktop role --- roles/desktop/defaults/main.yml | 4 ++-- roles/desktop/tasks/Fedora.yml | 4 ++++ roles/desktop/tasks/main.yml | 12 ++++++++---- 3 files changed, 14 insertions(+), 6 deletions(-) create mode 100644 roles/desktop/tasks/Fedora.yml 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') -- cgit v1.2.3