]> gitweb.fluxo.info Git - puppet-nodo.git/commitdiff
Fixing some variable scopes
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 24 Jan 2013 16:30:58 +0000 (14:30 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 24 Jan 2013 16:30:58 +0000 (14:30 -0200)
manifests/subsystems/utils.pp
manifests/subsystems/websites.pp
manifests/subsystems/xorg.pp

index ae21adb9e1d57595111210e62952945ee571823a..9d0b8b488adfa2626ab7e3ff6bf84b48a0ce144e 100644 (file)
@@ -22,12 +22,12 @@ class utils {
   # Ensure we have the minimum augeas version required by shorewall module
   package {
     'libaugeas0':
-      ensure => $lsbdistcodename ? {
+      ensure => $::lsbdistcodename ? {
         'squeeze' => '0.10.0-1~bpo60+3',
         default   => installed,
       };
     'augeas-tools':
-      ensure => $lsbdistcodename ? {
+      ensure => $::lsbdistcodename ? {
         'squeeze' => '0.10.0-1~bpo60+3',
         default   => installed,
       },
index 764ed97cfa335e9b8b7b93fbbfdf44bad9c78770..ba5ed321fce3a00570a5705b2949c8b21b840a5a 100644 (file)
@@ -20,7 +20,7 @@ class websites::setup {
     # This mode will also apply to files from the source directory
     mode    => 0644,
     # Puppet will automatically set +x for directories
-    source  => [ "puppet:///modules/site_apache/htdocs/$domain/images",
+    source  => [ "puppet:///modules/site_apache/htdocs/${::domain}/images",
                  "puppet:///modules/nodo/htdocs/images", ]
   }
 
@@ -30,7 +30,7 @@ class websites::setup {
     owner   => "root",
     group   => "root",
     mode    => 0644,
-    source  => [ "puppet:///modules/site_apache/htdocs/$domain/index.html",
+    source  => [ "puppet:///modules/site_apache/htdocs/${::domain}/index.html",
                  "puppet:///modules/nodo/htdocs/index.html", ]
   }
 
@@ -40,7 +40,7 @@ class websites::setup {
     owner   => "root",
     group   => "root",
     mode    => 0644,
-    source  => [ "puppet:///modules/site_apache/htdocs/$domain/missing.html",
+    source  => [ "puppet:///modules/site_apache/htdocs/${::domain}/missing.html",
                  "puppet:///modules/nodo/htdocs/missing.html", ]
   }
 
@@ -51,7 +51,7 @@ class websites::setup {
 
   # Default vhost: can just be applied on the defining host
   apache::site { "${apache::server_name}":
-    server_alias => "$domain",
+    server_alias => "${::domain}",
     docroot      => "${apache::www_folder}",
     mpm          => false,
     tag          => 'all',
@@ -114,17 +114,17 @@ class websites::hosting inherits websites::setup {
   }
 
   # Remove untagged site instances
-  Apache::Site <| tag != $hostname and tag != 'all' |> {
+  Apache::Site <| tag != $::hostname and tag != 'all' |> {
     ensure => absent,
   }
 
   # Remove untagged database instances
-  Database::Instance <| tag != $hostname and tag != 'all' |> {
+  Database::Instance <| tag != $::hostname and tag != 'all' |> {
     ensure => absent,
   }
 
   # Remove untagged ikiwiki instances
-  Ikiwiki::Instance <| tag != $hostname and tag != 'all' |> {
+  Ikiwiki::Instance <| tag != $::hostname and tag != 'all' |> {
     ensure => absent,
   }
 }
index f90feff7008eef2f5273d0d9d835ffa41aa92a97..70097074862b90b2eb524848490dfa0504473d41 100644 (file)
@@ -5,8 +5,8 @@ class xorg($enable = hiera('nodo::xorg::enable', false)) {
       owner   => root,
       group   => root,
       mode    => 0644,
-      source  => [ "puppet:///modules/site_nodo/X11/xorg.conf/${hostname}.${lsbdistcodename}",
-                   "puppet:///modules/site_nodo/X11/xorg.conf/${hostname}",
+      source  => [ "puppet:///modules/site_nodo/X11/xorg.conf/${::hostname}.${::lsbdistcodename}",
+                   "puppet:///modules/site_nodo/X11/xorg.conf/${::hostname}",
                    "puppet:///modules/site_nodo/X11/xorg.conf.default" ],
     }
   }