From 1507ed260f53bd63499610b51c664d35d7a0c009 Mon Sep 17 00:00:00 2001 From: Morgan Haskel Date: Tue, 9 Jun 2015 13:58:32 -0700 Subject: [PATCH] Revert "Support puppetlabs-concat 2.x" --- .fixtures.yml | 4 +++- manifests/balancer.pp | 4 +++- manifests/balancermember.pp | 1 + manifests/init.pp | 2 +- manifests/listen.pp | 1 + manifests/namevirtualhost.pp | 1 + metadata.json | 2 +- spec/defines/vhost_spec.rb | 6 +++--- 8 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.fixtures.yml b/.fixtures.yml index 6eddf260f..4645a757f 100644 --- a/.fixtures.yml +++ b/.fixtures.yml @@ -1,7 +1,9 @@ fixtures: repositories: stdlib: "git://github.com/puppetlabs/puppetlabs-stdlib.git" - concat: "git://github.com/puppetlabs/puppetlabs-concat.git" + concat: + repo: "git://github.com/puppetlabs/puppetlabs-concat.git" + branch: "1.2.x" portage: "git://github.com/gentoo/puppet-portage.git" symlinks: apache: "#{source_dir}" diff --git a/manifests/balancer.pp b/manifests/balancer.pp index 1c2391ebd..765dae629 100644 --- a/manifests/balancer.pp +++ b/manifests/balancer.pp @@ -47,7 +47,6 @@ $target = "${::apache::params::confd_dir}/balancer_${name}.conf" concat { $target: - ensure => present, owner => '0', group => '0', mode => '0644', @@ -55,6 +54,7 @@ } concat::fragment { "00-${name}-header": + ensure => present, target => $target, order => '01', content => "\n", @@ -67,12 +67,14 @@ # concat fragments. We don't have to do anything about them. concat::fragment { "01-${name}-proxyset": + ensure => present, target => $target, order => '19', content => inline_template("<% @proxy_set.keys.sort.each do |key| %> Proxyset <%= key %>=<%= @proxy_set[key] %>\n<% end %>"), } concat::fragment { "01-${name}-footer": + ensure => present, target => $target, order => '20', content => "\n", diff --git a/manifests/balancermember.pp b/manifests/balancermember.pp index c2be58880..459081a71 100644 --- a/manifests/balancermember.pp +++ b/manifests/balancermember.pp @@ -46,6 +46,7 @@ ) { concat::fragment { "BalancerMember ${name}": + ensure => present, target => "${::apache::params::confd_dir}/balancer_${balancer_cluster}.conf", content => inline_template(" BalancerMember ${url} <%= @options.join ' ' %>\n"), } diff --git a/manifests/init.pp b/manifests/init.pp index 1dfe6b0d5..9e6da9813 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -232,7 +232,6 @@ } concat { $ports_file: - ensure => present, owner => 'root', group => $::apache::params::root_group, mode => '0644', @@ -240,6 +239,7 @@ require => Package['httpd'], } concat::fragment { 'Apache ports header': + ensure => present, target => $ports_file, content => template('apache/ports_header.erb') } diff --git a/manifests/listen.pp b/manifests/listen.pp index 503ee8860..e6a8a3c76 100644 --- a/manifests/listen.pp +++ b/manifests/listen.pp @@ -3,6 +3,7 @@ # Template uses: $listen_addr_port concat::fragment { "Listen ${listen_addr_port}": + ensure => present, target => $::apache::ports_file, content => template('apache/listen.erb'), } diff --git a/manifests/namevirtualhost.pp b/manifests/namevirtualhost.pp index 4fa879518..f8c3a80d8 100644 --- a/manifests/namevirtualhost.pp +++ b/manifests/namevirtualhost.pp @@ -3,6 +3,7 @@ # Template uses: $addr_port concat::fragment { "NameVirtualHost ${addr_port}": + ensure => present, target => $::apache::ports_file, content => template('apache/namevirtualhost.erb'), } diff --git a/metadata.json b/metadata.json index d4300066c..71bad1d35 100644 --- a/metadata.json +++ b/metadata.json @@ -74,6 +74,6 @@ "description": "Module for Apache configuration", "dependencies": [ {"name":"puppetlabs/stdlib","version_requirement":">= 2.4.0 < 5.0.0"}, - {"name":"puppetlabs/concat","version_requirement":">= 1.1.1 < 3.0.0"} + {"name":"puppetlabs/concat","version_requirement":">= 1.1.1 < 2.0.0"} ] } diff --git a/spec/defines/vhost_spec.rb b/spec/defines/vhost_spec.rb index a3ce4919f..47c1b1f45 100644 --- a/spec/defines/vhost_spec.rb +++ b/spec/defines/vhost_spec.rb @@ -50,7 +50,7 @@ let :facts do default_facts end it { is_expected.to contain_class("apache") } it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_concat("25-rspec.example.com.conf").with( + it { is_expected.to contain_file("25-rspec.example.com.conf").with( :ensure => 'present', :path => '/etc/apache2/sites-available/25-rspec.example.com.conf' ) } @@ -77,7 +77,7 @@ let :facts do default_facts end it { is_expected.to contain_class("apache") } it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_concat("25-rspec.example.com.conf").with( + it { is_expected.to contain_file("25-rspec.example.com.conf").with( :ensure => 'present', :path => '/usr/local/etc/apache24/Vhosts/25-rspec.example.com.conf' ) } @@ -99,7 +99,7 @@ let :facts do default_facts end it { is_expected.to contain_class("apache") } it { is_expected.to contain_class("apache::params") } - it { is_expected.to contain_concat("25-rspec.example.com.conf").with( + it { is_expected.to contain_file("25-rspec.example.com.conf").with( :ensure => 'present', :path => '/etc/apache2/vhosts.d/25-rspec.example.com.conf' ) }