From a375035f2cd92f3ee3b90f922873b8404db2361b Mon Sep 17 00:00:00 2001 From: Martin Schuette Date: Sun, 1 Jun 2014 21:47:08 +0200 Subject: [PATCH] puppet-lintify --- manifests/sysadmin.pp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/manifests/sysadmin.pp b/manifests/sysadmin.pp index 4d494b5..9b91411 100644 --- a/manifests/sysadmin.pp +++ b/manifests/sysadmin.pp @@ -192,19 +192,19 @@ class ff_gw::sysadmin::hostname($newname, $newip) { $alias = regsubst($newname, '^([^.]*).*$', '\1') # clean old names - if "$::hostname" != "$alias" { - host { "$hostname": ensure => absent } + if $::hostname != $alias { + host { $::hostname: ensure => absent } } - if "$::fqdn" != "$newname" { - host { "$fqdn": ensure => absent } + if $::fqdn != $newname { + host { $::fqdn: ensure => absent } } # rewrite config files: - host { "$newname": + host { $newname: ensure => present, ip => $newip, alias => $alias ? { - "$hostname" => undef, + $::hostname => undef, default => $alias }, before => Exec['hostname.sh'], @@ -214,7 +214,7 @@ class ff_gw::sysadmin::hostname($newname, $newip) { ensure => present, owner => 'root', group => 'root', - mode => 644, + mode => '0644', content => "${newname}\n", } @@ -222,7 +222,7 @@ class ff_gw::sysadmin::hostname($newname, $newip) { ensure => present, owner => 'root', group => 'root', - mode => 644, + mode => '0644', content => "${newname}\n", notify => Exec['hostname.sh'], }