From c1a606b8ddb9c4c9aed38c639513ead4ea60d6ef Mon Sep 17 00:00:00 2001 From: Adam Dodman Date: Thu, 22 Feb 2018 15:05:43 +0000 Subject: [PATCH] Update facts for legacy facter support --- examples/init.pp | 2 +- manifests/init.pp | 2 +- templates/motd.epp | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/init.pp b/examples/init.pp index 5065cfc..08a212d 100644 --- a/examples/init.pp +++ b/examples/init.pp @@ -9,4 +9,4 @@ # Learn more about module testing here: # https://docs.puppet.com/guides/tests_smoke.html # -include ::motd +include motd diff --git a/manifests/init.pp b/manifests/init.pp index e8a230e..6293e24 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -22,7 +22,7 @@ # class motd { $motd_hash = { - 'ascii' => generate('/bin/sh', '-c', "/usr/bin/figlet -cw 60 ${$facts['networking']['hostname']}"), + 'ascii' => generate('/bin/sh', '-c', "/usr/bin/figlet -cw 60 ${$facts['hostname']}"), } file { '/etc/motd': diff --git a/templates/motd.epp b/templates/motd.epp index ed6868f..0315423 100644 --- a/templates/motd.epp +++ b/templates/motd.epp @@ -5,13 +5,13 @@ ------------------------------------------------------------ <%= $ascii %> ------------------------------------------------------------ - Welcome to <%= $facts['networking']['fqdn'] %> - OS: <%= $facts['os']['name'] %> <%= $facts['os']['release']['full'] %> - OS Family: <%= $facts['os']['family'] %> - Architecture: <%= $facts['os']['architecture'] %> + Welcome to <%= $facts['fqdn'] %> + OS: <%= $facts['operatingsystem'] %> <%= $facts['operatingsystemrelease'] %> + OS Family: <%= $facts['osfamily'] %> + Architecture: <%= $facts['architecture'] %> Kernel Version: <%= $facts['kernelversion'] %> - IP: <%= $facts['networking']['ip'] %> - RAM: <%= $facts['memory']['system']['total'] %> + IP: <%= $facts['ipaddress'] %> + RAM: <%= $facts['memorysize'] %> ------------------------------------------------------------ This system is managed by Puppet version <%= $facts['puppetversion'] %> ------------------------------------------------------------