If the user specifies --tags, puppet will not sync custom types and
providers.

Puppet will only ignore tags and noop, if the catalog is not
marked as a host_config. That was true for the catalog that is build by
settings.rb but not true for the catalog build by downloader.rb.

Signed-off-by: Stefan Schulte <[email protected]>
---
 lib/puppet/configurer/downloader.rb     |    1 +
 spec/unit/configurer/downloader_spec.rb |   14 ++++++++++++++
 2 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/lib/puppet/configurer/downloader.rb 
b/lib/puppet/configurer/downloader.rb
index 1b587ed..b369620 100644
--- a/lib/puppet/configurer/downloader.rb
+++ b/lib/puppet/configurer/downloader.rb
@@ -50,6 +50,7 @@ class Puppet::Configurer::Downloader
 
   def catalog
     catalog = Puppet::Resource::Catalog.new
+    catalog.host_config = false
     catalog.add_resource(file)
     catalog
   end
diff --git a/spec/unit/configurer/downloader_spec.rb 
b/spec/unit/configurer/downloader_spec.rb
index c57f39f..d93ec14 100755
--- a/spec/unit/configurer/downloader_spec.rb
+++ b/spec/unit/configurer/downloader_spec.rb
@@ -102,6 +102,7 @@ describe Puppet::Configurer::Downloader do
     it "should create a catalog and add the file to it" do
       file = mock 'file'
       catalog = mock 'catalog'
+      catalog.stubs(:host_config=)
 
       @dler.expects(:file).returns file
 
@@ -110,6 +111,19 @@ describe Puppet::Configurer::Downloader do
 
       @dler.catalog.should equal(catalog)
     end
+
+    it "should specify that it is not managing a host catalog" do
+      file = mock 'file'
+      catalog = mock 'catalog'
+      catalog.stubs(:add_resource)
+
+      @dler.expects(:file).returns file
+
+      Puppet::Resource::Catalog.expects(:new).returns catalog
+      catalog.expects(:host_config=).with(false)
+      @dler.catalog.should equal(catalog)
+    end
+
   end
 
   describe "when downloading" do
-- 
1.7.3.4

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to