Started some basic desktop enviroment installs
This commit is contained in:
parent
8b2d05c38d
commit
56a7ed0155
16
manifests/dm.pp
Normal file
16
manifests/dm.pp
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# @summary A short summary of the purpose of this class
|
||||||
|
#
|
||||||
|
# A description of what this class does
|
||||||
|
#
|
||||||
|
# @example
|
||||||
|
# include desktop::dm
|
||||||
|
class desktop::dm (
|
||||||
|
Boolean $display_manager_manage = $desktop::display_manager_manage,
|
||||||
|
String $display_manager_package = $desktop::display_manager_package,
|
||||||
|
) {
|
||||||
|
if $display_manager_manage {
|
||||||
|
package { $display_manager_package:
|
||||||
|
ensure => present,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
30
manifests/init.pp
Normal file
30
manifests/init.pp
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
# @summary A short summary of the purpose of this class
|
||||||
|
#
|
||||||
|
# A description of what this class does
|
||||||
|
#
|
||||||
|
# @example
|
||||||
|
# include desktop
|
||||||
|
class desktop (
|
||||||
|
Boolean $display_manager_manage = $desktop::params::display_manager_manage,
|
||||||
|
String $display_manager_package = $desktop::params::display_manager_package,
|
||||||
|
|
||||||
|
Boolean $all_desktop_install = $desktop::params::all_desktop_install,
|
||||||
|
|
||||||
|
Boolean $mate_desktop_install = $desktop::params::mate_desktop_install,
|
||||||
|
String $mate_desktop_package = $desktop::params::mate_desktop_package,
|
||||||
|
|
||||||
|
Boolean $kde_desktop_install = $desktop::params::kde_desktop_install,
|
||||||
|
String $kde_desktop_package = $desktop::params::kde_desktop_package,
|
||||||
|
) inherits desktop::params {
|
||||||
|
if $desktop::display_manager_manage {
|
||||||
|
contain desktop::dm
|
||||||
|
}
|
||||||
|
|
||||||
|
if $desktop::mate_desktop_install {
|
||||||
|
contain desktop::mate
|
||||||
|
}
|
||||||
|
|
||||||
|
if $desktop::kde_desktop_install {
|
||||||
|
contain desktop::kde
|
||||||
|
}
|
||||||
|
}
|
16
manifests/kde.pp
Normal file
16
manifests/kde.pp
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# @summary A short summary of the purpose of this class
|
||||||
|
#
|
||||||
|
# A description of what this class does
|
||||||
|
#
|
||||||
|
# @example
|
||||||
|
# include desktop::kde
|
||||||
|
class desktop::kde (
|
||||||
|
Boolean $kde_desktop_install = $desktop::kde_desktop_install,
|
||||||
|
String $kde_desktop_package = $desktop::kde_desktop_package,
|
||||||
|
) {
|
||||||
|
if $kde_desktop_install {
|
||||||
|
package { $kde_desktop_package:
|
||||||
|
ensure => present,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
16
manifests/mate.pp
Normal file
16
manifests/mate.pp
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# @summary A short summary of the purpose of this class
|
||||||
|
#
|
||||||
|
# A description of what this class does
|
||||||
|
#
|
||||||
|
# @example
|
||||||
|
# include desktop::mate
|
||||||
|
class desktop::mate (
|
||||||
|
Boolean $mate_desktop_install = $desktop::mate_desktop_install,
|
||||||
|
String $mate_desktop_package = $desktop::mate_desktop_package,
|
||||||
|
) {
|
||||||
|
if $mate_desktop_install {
|
||||||
|
package { $mate_desktop_package:
|
||||||
|
ensure => present,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
33
manifests/params.pp
Normal file
33
manifests/params.pp
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
# @summary A short summary of the purpose of this class
|
||||||
|
#
|
||||||
|
# A description of what this class does
|
||||||
|
#
|
||||||
|
# @example
|
||||||
|
# include desktop::params
|
||||||
|
class desktop::params {
|
||||||
|
# Display manager variables
|
||||||
|
$display_manager_manage = true
|
||||||
|
$display_manager_package = $facts['os']['family'] ? {
|
||||||
|
'Debian' => 'gdm3',
|
||||||
|
default => 'gdm',
|
||||||
|
}
|
||||||
|
|
||||||
|
# Common variables
|
||||||
|
$all_desktop_install = false
|
||||||
|
|
||||||
|
# MATE desktop variables
|
||||||
|
$mate_desktop_install = $all_desktop_install
|
||||||
|
$mate_desktop_package = $facts['os']['family'] ? {
|
||||||
|
'RedHat' => 'mate-desktop',
|
||||||
|
'Debian' => 'mate-desktop-environment',
|
||||||
|
'FreeBSD' => 'mate',
|
||||||
|
}
|
||||||
|
|
||||||
|
# KDE desktop variables
|
||||||
|
$kde_desktop_install = $all_desktop_install
|
||||||
|
$kde_desktop_package = $facts['os']['family'] ? {
|
||||||
|
'RedHat' => 'kde-desktop',
|
||||||
|
'Debian' => 'kde-plasma-desktop',
|
||||||
|
'FreeBSD' => 'kde5',
|
||||||
|
}
|
||||||
|
}
|
13
spec/classes/desktop_spec.rb
Normal file
13
spec/classes/desktop_spec.rb
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
require 'spec_helper'
|
||||||
|
|
||||||
|
describe 'desktop' do
|
||||||
|
on_supported_os.each do |os, os_facts|
|
||||||
|
context "on #{os}" do
|
||||||
|
let(:facts) { os_facts }
|
||||||
|
|
||||||
|
it { is_expected.to compile.with_all_deps }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
13
spec/classes/dm_spec.rb
Normal file
13
spec/classes/dm_spec.rb
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
require 'spec_helper'
|
||||||
|
|
||||||
|
describe 'desktop::dm' do
|
||||||
|
on_supported_os.each do |os, os_facts|
|
||||||
|
context "on #{os}" do
|
||||||
|
let(:facts) { os_facts }
|
||||||
|
|
||||||
|
it { is_expected.to compile.with_all_deps }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
13
spec/classes/kde_spec.rb
Normal file
13
spec/classes/kde_spec.rb
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
require 'spec_helper'
|
||||||
|
|
||||||
|
describe 'desktop::kde' do
|
||||||
|
on_supported_os.each do |os, os_facts|
|
||||||
|
context "on #{os}" do
|
||||||
|
let(:facts) { os_facts }
|
||||||
|
|
||||||
|
it { is_expected.to compile.with_all_deps }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
13
spec/classes/mate_spec.rb
Normal file
13
spec/classes/mate_spec.rb
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
require 'spec_helper'
|
||||||
|
|
||||||
|
describe 'desktop::mate' do
|
||||||
|
on_supported_os.each do |os, os_facts|
|
||||||
|
context "on #{os}" do
|
||||||
|
let(:facts) { os_facts }
|
||||||
|
|
||||||
|
it { is_expected.to compile.with_all_deps }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
13
spec/classes/params_spec.rb
Normal file
13
spec/classes/params_spec.rb
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
require 'spec_helper'
|
||||||
|
|
||||||
|
describe 'desktop::params' do
|
||||||
|
on_supported_os.each do |os, os_facts|
|
||||||
|
context "on #{os}" do
|
||||||
|
let(:facts) { os_facts }
|
||||||
|
|
||||||
|
it { is_expected.to compile.with_all_deps }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in New Issue
Block a user