Puppet Class: linuxmint

Inherits:
linuxmint::params
Defined in:
manifests/init.pp

Overview

Class: linuxmint

Manage configuration of Linux Mint

Examples:

Declaring the class

class { 'linuxmint':
  group => 'thegroup',
  user  => 'theuser',
}

Parameters:

  • group (String) (defaults to: $linuxmint::params::group)

    Mandatory parameter that specifies the group for the user param

  • user (String) (defaults to: $linuxmint::params::user)

    Mandatory parameter that specifies the user to configure



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# File 'manifests/init.pp', line 13

class linuxmint (
  String $group = $linuxmint::params::group,
  String $user  = $linuxmint::params::user,
) inherits linuxmint::params {
  assert_type(String[1], $group)
  assert_type(String[1], $user)

  #############################################################################
  # Create common folders
  #############################################################################
  file { "/home/${user}/.local/share/cinnamon":
    ensure  => directory,
    owner   => $user,
    group   => $group,
    mode    => '0775',
    require => [
      User[$user],
      Group[$group],
    ],
  }

  file { $linuxmint::params::packages_root:
    ensure => 'directory',
    group  => 'root',
    mode   => '0755',
    owner  => 'root',
  }

  #############################################################################
  # Instatiate classes
  #############################################################################
  class { 'linuxmint::install::applets':
    group   => $group,
    user    => $user,
    require => [
      User[$user],
      Group[$group],
    ],
  }

  class { 'linuxmint::config::applets':
    group   => $group,
    user    => $user,
    require => [
      User[$user],
      Group[$group],
    ],
  }

  class { 'linuxmint::config::cinnamon':
    user    => $user,
    require => [
      User[$user],
    ],
  }

  class { 'linuxmint::config::mintwelcome':
    group   => $group,
    user    => $user,
    require => [
      User[$user],
      Group[$group],
    ],
  }

  class { 'linuxmint::config::software_centre':
    user    => $user,
    require => [
      User[$user],
    ],
  }

  contain linuxmint::install::applets
  contain linuxmint::config::applets
  contain linuxmint::config::cinnamon
  contain linuxmint::config::mintwelcome
  contain linuxmint::config::software_centre

  Class['linuxmint::install::applets']
  -> Class['linuxmint::config::applets']
}