summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG2
-rw-r--r--conf/gentoo/puppet/puppet.conf29
-rwxr-xr-xconf/gentoo/puppet/puppetca.conf29
-rw-r--r--conf/gentoo/puppet/puppetd.conf29
-rwxr-xr-xconf/gentoo/puppet/puppetmasterd.conf29
-rw-r--r--lib/puppet/util/settings.rb25
-rwxr-xr-xspec/unit/util/settings.rb10
7 files changed, 54 insertions, 99 deletions
diff --git a/CHANGELOG b/CHANGELOG
index f34679fb6..e49253b3a 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,5 @@
+ Fixing #794 -- consolidating the gentoo configuration files.
+
Fixing #976 -- both the full name of qualified classes and
the class parts are now added as tags. I've also
created a Tagging module that we should push throughout
diff --git a/conf/gentoo/puppet/puppet.conf b/conf/gentoo/puppet/puppet.conf
new file mode 100644
index 000000000..1d62c90e4
--- /dev/null
+++ b/conf/gentoo/puppet/puppet.conf
@@ -0,0 +1,29 @@
+[main]
+ # Where Puppet stores dynamic and growing data.
+ # The default value is '/var/puppet'.
+ vardir = /var/lib/puppet
+
+ # The Puppet log directory.
+ # The default value is '$vardir/log'.
+ logdir = /var/log/puppet
+
+ # Where Puppet PID files are kept.
+ # The default value is '$vardir/run'.
+ rundir = /var/run/puppet
+
+ # Where SSL certificates are kept.
+ # The default value is '$confdir/ssl'.
+ ssldir = $vardir/ssl
+
+[puppetd]
+ # The file in which puppetd stores a list of the classes
+ # associated with the retrieved configuratiion. Can be loaded in
+ # the separate ``puppet`` executable using the ``--loadclasses``
+ # option.
+ # The default value is '$confdir/classes.txt'.
+ classfile = $vardir/classes.txt
+
+ # Where puppetd caches the local configuration. An
+ # extension indicating the cache format is added automatically.
+ # The default value is '$confdir/localconfig'.
+ localconfig = $vardir/localconfig
diff --git a/conf/gentoo/puppet/puppetca.conf b/conf/gentoo/puppet/puppetca.conf
deleted file mode 100755
index 35f4abf1a..000000000
--- a/conf/gentoo/puppet/puppetca.conf
+++ /dev/null
@@ -1,29 +0,0 @@
-[puppet]
- # Where Puppet stores dynamic and growing data.
- # The default value is '/var/puppet'.
- vardir = /var/lib/puppet
-
- # The Puppet log directory.
- # The default value is '$vardir/log'.
- logdir = /var/log/puppet
-
- # Where Puppet PID files are kept.
- # The default value is '$vardir/run'.
- rundir = /var/run/puppet
-
- # Where SSL certificates are kept.
- # The default value is '$confdir/ssl'.
- ssldir = $vardir/ssl
-
-[puppetd]
- # The file in which puppetd stores a list of the classes
- # associated with the retrieved configuratiion. Can be loaded in
- # the separate ``puppet`` executable using the ``--loadclasses``
- # option.
- # The default value is '$confdir/classes.txt'.
- classfile = $vardir/classes.txt
-
- # Where puppetd caches the local configuration. An
- # extension indicating the cache format is added automatically.
- # The default value is '$confdir/localconfig'.
- localconfig = $vardir/localconfig
diff --git a/conf/gentoo/puppet/puppetd.conf b/conf/gentoo/puppet/puppetd.conf
deleted file mode 100644
index 35f4abf1a..000000000
--- a/conf/gentoo/puppet/puppetd.conf
+++ /dev/null
@@ -1,29 +0,0 @@
-[puppet]
- # Where Puppet stores dynamic and growing data.
- # The default value is '/var/puppet'.
- vardir = /var/lib/puppet
-
- # The Puppet log directory.
- # The default value is '$vardir/log'.
- logdir = /var/log/puppet
-
- # Where Puppet PID files are kept.
- # The default value is '$vardir/run'.
- rundir = /var/run/puppet
-
- # Where SSL certificates are kept.
- # The default value is '$confdir/ssl'.
- ssldir = $vardir/ssl
-
-[puppetd]
- # The file in which puppetd stores a list of the classes
- # associated with the retrieved configuratiion. Can be loaded in
- # the separate ``puppet`` executable using the ``--loadclasses``
- # option.
- # The default value is '$confdir/classes.txt'.
- classfile = $vardir/classes.txt
-
- # Where puppetd caches the local configuration. An
- # extension indicating the cache format is added automatically.
- # The default value is '$confdir/localconfig'.
- localconfig = $vardir/localconfig
diff --git a/conf/gentoo/puppet/puppetmasterd.conf b/conf/gentoo/puppet/puppetmasterd.conf
deleted file mode 100755
index 35f4abf1a..000000000
--- a/conf/gentoo/puppet/puppetmasterd.conf
+++ /dev/null
@@ -1,29 +0,0 @@
-[puppet]
- # Where Puppet stores dynamic and growing data.
- # The default value is '/var/puppet'.
- vardir = /var/lib/puppet
-
- # The Puppet log directory.
- # The default value is '$vardir/log'.
- logdir = /var/log/puppet
-
- # Where Puppet PID files are kept.
- # The default value is '$vardir/run'.
- rundir = /var/run/puppet
-
- # Where SSL certificates are kept.
- # The default value is '$confdir/ssl'.
- ssldir = $vardir/ssl
-
-[puppetd]
- # The file in which puppetd stores a list of the classes
- # associated with the retrieved configuratiion. Can be loaded in
- # the separate ``puppet`` executable using the ``--loadclasses``
- # option.
- # The default value is '$confdir/classes.txt'.
- classfile = $vardir/classes.txt
-
- # Where puppetd caches the local configuration. An
- # extension indicating the cache format is added automatically.
- # The default value is '$confdir/localconfig'.
- localconfig = $vardir/localconfig
diff --git a/lib/puppet/util/settings.rb b/lib/puppet/util/settings.rb
index b672d9564..ff019edb8 100644
--- a/lib/puppet/util/settings.rb
+++ b/lib/puppet/util/settings.rb
@@ -510,18 +510,19 @@ class Puppet::Util::Settings
end
# Only files are convertable to transportable resources.
- if obj.respond_to? :to_transportable
- next if value(obj.name) =~ /^\/dev/
- transobjects = obj.to_transportable
- transobjects = [transobjects] unless transobjects.is_a? Array
- transobjects.each do |trans|
- # transportable could return nil
- next unless trans
- unless done[:file].include? trans.name
- @created << trans.name
- objects << trans
- done[:file][trans.name] = trans
- end
+ next unless obj.respond_to? :to_transportable
+ next if value(obj.name) =~ /^\/dev/
+ next if Puppet::Type::File[obj.value] # skip files that are in our global resource list.
+
+ transobjects = obj.to_transportable
+ transobjects = [transobjects] unless transobjects.is_a? Array
+ transobjects.each do |trans|
+ # transportable could return nil
+ next unless trans
+ unless done[:file].include? trans.name
+ @created << trans.name
+ objects << trans
+ done[:file][trans.name] = trans
end
end
end
diff --git a/spec/unit/util/settings.rb b/spec/unit/util/settings.rb
index 540743d7e..f00afd1b7 100755
--- a/spec/unit/util/settings.rb
+++ b/spec/unit/util/settings.rb
@@ -597,6 +597,14 @@ describe Puppet::Util::Settings, " when being used to manage the host machine" d
file.should be_nil
end
+ it "should not try to manage files in memory" do
+ main = Puppet::Type.type(:file).create(:path => "/maindir")
+
+ trans = @settings.to_transportable
+
+ lambda { trans.to_catalog }.should_not raise_error
+ end
+
it "should be able to turn the current configuration into a parseable manifest"
it "should convert octal numbers correctly when producing a manifest"
@@ -635,4 +643,6 @@ describe Puppet::Util::Settings, " when being used to manage the host machine" d
proc { @settings.use(:whatever) }.should raise_error(RuntimeError)
end
+
+ after { Puppet::Type.allclear }
end