Skip to content

Commit 6e33255

Browse files
committed
Merge pull request #1126 from domcleal/concat-2
Support puppetlabs-concat 2.x
2 parents bf061e6 + 1919eb3 commit 6e33255

8 files changed

Lines changed: 7 additions & 14 deletions

File tree

.fixtures.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
fixtures:
22
repositories:
33
stdlib: "git://github.com/puppetlabs/puppetlabs-stdlib.git"
4-
concat:
5-
repo: "git://github.com/puppetlabs/puppetlabs-concat.git"
6-
branch: "1.2.x"
4+
concat: "git://github.com/puppetlabs/puppetlabs-concat.git"
75
portage: "git://github.com/gentoo/puppet-portage.git"
86
symlinks:
97
apache: "#{source_dir}"

manifests/balancer.pp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@
4747
$target = "${::apache::params::confd_dir}/balancer_${name}.conf"
4848

4949
concat { $target:
50+
ensure => present,
5051
owner => '0',
5152
group => '0',
5253
mode => '0644',
5354
notify => Class['Apache::Service'],
5455
}
5556

5657
concat::fragment { "00-${name}-header":
57-
ensure => present,
5858
target => $target,
5959
order => '01',
6060
content => "<Proxy balancer://${name}>\n",
@@ -67,14 +67,12 @@
6767
# concat fragments. We don't have to do anything about them.
6868

6969
concat::fragment { "01-${name}-proxyset":
70-
ensure => present,
7170
target => $target,
7271
order => '19',
7372
content => inline_template("<% @proxy_set.keys.sort.each do |key| %> Proxyset <%= key %>=<%= @proxy_set[key] %>\n<% end %>"),
7473
}
7574

7675
concat::fragment { "01-${name}-footer":
77-
ensure => present,
7876
target => $target,
7977
order => '20',
8078
content => "</Proxy>\n",

manifests/balancermember.pp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
) {
4747

4848
concat::fragment { "BalancerMember ${name}":
49-
ensure => present,
5049
target => "${::apache::params::confd_dir}/balancer_${balancer_cluster}.conf",
5150
content => inline_template(" BalancerMember ${url} <%= @options.join ' ' %>\n"),
5251
}

manifests/init.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,14 +232,14 @@
232232
}
233233

234234
concat { $ports_file:
235+
ensure => present,
235236
owner => 'root',
236237
group => $::apache::params::root_group,
237238
mode => '0644',
238239
notify => Class['Apache::Service'],
239240
require => Package['httpd'],
240241
}
241242
concat::fragment { 'Apache ports header':
242-
ensure => present,
243243
target => $ports_file,
244244
content => template('apache/ports_header.erb')
245245
}

manifests/listen.pp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
# Template uses: $listen_addr_port
55
concat::fragment { "Listen ${listen_addr_port}":
6-
ensure => present,
76
target => $::apache::ports_file,
87
content => template('apache/listen.erb'),
98
}

manifests/namevirtualhost.pp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
# Template uses: $addr_port
55
concat::fragment { "NameVirtualHost ${addr_port}":
6-
ensure => present,
76
target => $::apache::ports_file,
87
content => template('apache/namevirtualhost.erb'),
98
}

metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,6 @@
6868
"description": "Module for Apache configuration",
6969
"dependencies": [
7070
{"name":"puppetlabs/stdlib","version_requirement":">= 2.4.0 < 5.0.0"},
71-
{"name":"puppetlabs/concat","version_requirement":">= 1.1.1 < 2.0.0"}
71+
{"name":"puppetlabs/concat","version_requirement":">= 1.1.1 < 3.0.0"}
7272
]
7373
}

spec/defines/vhost_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
let :facts do default_facts end
5151
it { is_expected.to contain_class("apache") }
5252
it { is_expected.to contain_class("apache::params") }
53-
it { is_expected.to contain_file("25-rspec.example.com.conf").with(
53+
it { is_expected.to contain_concat("25-rspec.example.com.conf").with(
5454
:ensure => 'present',
5555
:path => '/etc/apache2/sites-available/25-rspec.example.com.conf'
5656
) }
@@ -77,7 +77,7 @@
7777
let :facts do default_facts end
7878
it { is_expected.to contain_class("apache") }
7979
it { is_expected.to contain_class("apache::params") }
80-
it { is_expected.to contain_file("25-rspec.example.com.conf").with(
80+
it { is_expected.to contain_concat("25-rspec.example.com.conf").with(
8181
:ensure => 'present',
8282
:path => '/usr/local/etc/apache24/Vhosts/25-rspec.example.com.conf'
8383
) }
@@ -99,7 +99,7 @@
9999
let :facts do default_facts end
100100
it { is_expected.to contain_class("apache") }
101101
it { is_expected.to contain_class("apache::params") }
102-
it { is_expected.to contain_file("25-rspec.example.com.conf").with(
102+
it { is_expected.to contain_concat("25-rspec.example.com.conf").with(
103103
:ensure => 'present',
104104
:path => '/etc/apache2/vhosts.d/25-rspec.example.com.conf'
105105
) }

0 commit comments

Comments
 (0)