summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--LICENSE19
-rw-r--r--README.md58
-rw-r--r--defaults/main.yml3
-rw-r--r--meta/main.yml23
-rw-r--r--tasks/Debian.yml7
-rw-r--r--tasks/RedHat.yml29
-rw-r--r--tasks/main.yml5
7 files changed, 144 insertions, 0 deletions
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..f14e71c
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2015 Nathan Sowatskey <nathan@nathan.to>
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the "Software"),
+to deal in the Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..4291cbe
--- /dev/null
+++ b/README.md
@@ -0,0 +1,58 @@
+Ansible Linux Desktop Role
+==========================
+
+[![Build Status](https://travis-ci.org/smola/ansible-java-role.svg?branch=master)](https://travis-ci.org/smola/ansible-java-role)
+
+Manages installation of a Linux desktop of choice on RedHat and Debian distributions.
+All packages are installed using the package manager.
+
+Requirements
+------------
+
+None.
+
+Role Variables
+--------------
+
+The main variable is the name of the desktop to be installed. The supported
+desktops are listed below:
+
+# Debian / Ubuntu
+
+Valid desktops for Debian and Ubuntu are:
+
+...
+
+# Fedora/RedHat
+
+Valid desktops for Fedora and RedHat are:
+
+...
+
+# Others
+
+Got this role working with a different distro? Please, [report it on GitHub](https://github.com/DevOps4Networks/ansible-linux-desktop-role/issues).
+
+Dependencies
+------------
+
+None.
+
+Example Playbook
+-------------------------
+...
+License
+-------
+
+Copyright (c) Nathan Sowatskey <nathan@nathan.to>
+
+ansible-linux-desktop-role is released under the terms of the MIT License.
+
+
+Acknowledgements
+----------------
+
+Thanks to [Santiago M. Mola](https://github.com/smola) from whom I have borrowed
+some ideas from his [ansible-java-role](https://github.com/smola/ansible-java-role)
+and also idea from
+[Testing Ansible Roles with Travis CI on GitHub](https://servercheck.in/blog/testing-ansible-roles-travis-ci-github).
diff --git a/defaults/main.yml b/defaults/main.yml
new file mode 100644
index 0000000..8808c12
--- /dev/null
+++ b/defaults/main.yml
@@ -0,0 +1,3 @@
+---
+debian_desktop: []
+redhat_desktop: []
diff --git a/meta/main.yml b/meta/main.yml
new file mode 100644
index 0000000..06a049a
--- /dev/null
+++ b/meta/main.yml
@@ -0,0 +1,23 @@
+---
+galaxy_info:
+ author: Nathan Sowatskey
+ description: Linux desktops - Gnome, KDE, Cinnamon, MATE, Xfce.
+ license: MIT
+ min_ansible_version: 1.6.3
+ platforms:
+ - name: Ubuntu
+ versions:
+ - all
+ - name: Debian
+ versions:
+ - all
+ - name: EL
+ versions:
+ - all
+ - name: Fedora
+ versions:
+ - all
+ categories:
+ - development
+ - system
+dependencies: []
diff --git a/tasks/Debian.yml b/tasks/Debian.yml
new file mode 100644
index 0000000..2a6bc5c
--- /dev/null
+++ b/tasks/Debian.yml
@@ -0,0 +1,7 @@
+---
+
+- name: Install Debian Gnome desktop
+ apt: name="@^gnome-desktop-environment" state=present
+ when: debian_desktop == 'gnome'
+
+
diff --git a/tasks/RedHat.yml b/tasks/RedHat.yml
new file mode 100644
index 0000000..eaa92ff
--- /dev/null
+++ b/tasks/RedHat.yml
@@ -0,0 +1,29 @@
+---
+
+- debug: var=redhat_desktop
+
+- name: Install RedHat Gnome desktop
+ yum: name="@^gnome-desktop-environment" state=present
+ when: redhat_desktop == 'gnome' or redhat_desktop == 'gnome_shell'
+
+- name: Install RedHat KDE desktop
+ yum: name="@^kde-desktop-environment" state=present
+ when: redhat_desktop == 'kde'
+
+- name: Install RedHat Cinnamon desktop
+ #shell: yum --enablerepo=epel -y install cinnamon* x11
+ yum: enablerepo=epel name="@^cinnamon*" state=present
+ when: redhat_desktop == 'cinnamon'
+
+- name: Install RedHat MATE desktop
+ #shell: yum --enablerepo=epel -y groupinstall mate-desktop-environment x11
+ yum: enablerepo=epel name="@^mate-desktop-environment" state=present
+ when: redhat_desktop == 'mate'
+
+- name: Install RedHat Xfce desktop
+ #shell: yum --enablerepo=epel -y groupinstall xfce-desktop x11
+ yum: enablerepo=epel name="@^xfce-desktop" state=present
+ when: redhat_desktop == 'xfce'
+
+- name: Install RedHat X11
+ yum: name="@x11" state=present
diff --git a/tasks/main.yml b/tasks/main.yml
new file mode 100644
index 0000000..fca07c5
--- /dev/null
+++ b/tasks/main.yml
@@ -0,0 +1,5 @@
+---
+- include: Debian.yml
+ when: ansible_os_family == 'Debian'
+- include: RedHat.yml
+ when: ansible_os_family == 'RedHat'