* Create the "update-motd.d" to use the dynamic MOTD generation.

This commit is contained in:
gardouille 2015-02-02 11:23:17 +01:00
parent 4039d202db
commit 3175d02e42
4 changed files with 13 additions and 0 deletions

View File

@ -5,6 +5,7 @@
##### Changes
* Update dynmotd script (new process and sockets informations).
* Create the "update-motd.d" to use the dynamic MOTD generation.
---------------------------------------

View File

@ -10,10 +10,17 @@ class dynmotd::config {
mode => 0644,
}
file { "${dynmotd::update_motd_dir_path}":
ensure => directory,
}
file { "${dynmotd::dynmotd_bin_path}":
ensure => present,
mode => 0755,
content => template("${dynmotd::dynmotd_bin_content}"),
}
File["${dynmotd::update_motd_dir_path}"] -> File["${dynmotd::dynmotd_bin_path}"]
} # Private class: dynmotd::config

View File

@ -38,6 +38,7 @@
class dynmotd (
$dynmotd_bin_path = $dynmotd::params::dynmotd_bin_path,
$dynmotd_bin_content = $dynmotd::params::dynmotd_bin_content,
$update_motd_dir_path = $dynmotd::params::update_motd_dir_path,
) inherits dynmotd::params {
include dynmotd::config

View File

@ -4,11 +4,15 @@ class dynmotd::params {
case $::osfamily {
'Debian': {
# Dynamic Motd's script directory
$update_motd_dir_path = '/etc/update-motd.d'
# DynMotd script
$dynmotd_bin_path = '/usr/local/bin/dynmotd'
$dynmotd_bin_content = 'dynmotd/dynmotd_bin.erb'
}
}
} # Private class: dynmotd::params