]> gitweb.fluxo.info Git - puppet-nodo.git/commitdiff
Setting nodo::sshd_print_motd as false by default
authorSilvio Rhatto <rhatto@riseup.net>
Fri, 25 Jan 2013 13:32:26 +0000 (11:32 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Fri, 25 Jan 2013 13:32:26 +0000 (11:32 -0200)
manifests/nodo.pp
manifests/subsystems/hosts.pp

index edce74cfb9aa4bc8e2eb39cc69750df82b22b0d5..ba27640b462ce2a340dbe02fcda018ee2a361e63 100644 (file)
@@ -5,13 +5,14 @@ class nodo {
   include motd
   include utils
   include cron
-  include hosts
   include locales
   include tunnel
   include profile
   include domain
   include concat::setup
 
+  class { 'hosts': }
+
   if !defined('puppetd') {
     class { 'puppetd': }
   }
@@ -101,7 +102,7 @@ class nodo {
     shared_ip               => hiera('nodo::sshd_shared_ip',               'yes'),
     tcp_forwarding          => hiera('nodo::sshd_tcp_forwarding',          'yes'),
     hardened_ssl            => hiera('nodo::sshd_hardened_ssl',            'yes'),
-    print_motd              => hiera('nodo::sshd_print_motd',              'yes'),
+    print_motd              => hiera('nodo::sshd_print_motd',              'no'),
     ports                   => hiera('nodo::sshd_ports',                   [ 22 ]),
     use_pam                 => hiera('nodo::sshd_use_pam',                 'no'),
   }
index e1833eae671e4365379cb43322d28770c025f61e..945385335a14ca83d11e734e18928ab9586583bc 100644 (file)
@@ -1,21 +1,23 @@
-class hosts {
+class hosts(
+  $custom = hiera('nodo::hosts::custom', false)
+) {
   # Sometimes might be useful to manage the whole
   # hosts file, see http://projects.puppetlabs.com/issues/10704
-  case $nodo_custom_hosts_file {
+  case $custom {
     true: {
       file { '/etc/hosts':
         ensure => present,
         owner  => root,
         group  => root,
         mode   => 0640,
-        source => "puppet:///modules/site_nodo/hosts/$fqdn",
+        source => "puppet:///modules/site_nodo/hosts/${::fqdn}",
       }
     }
     default: {
-      host { "$hostname":
+      host { "${::hostname}":
         ensure       => present,
-        ip           => "$ipaddress",
-        host_aliases => [ "$fqdn" ],
+        ip           => "${::ipaddress}",
+        host_aliases => [ "${::fqdn}" ],
       }
     
       host { "localhost":