Ask Your Question

concat::fragment not inserting content in vhost

asked 2015-05-19 09:11:14 -0500

AntonioCS gravatar image

So I have a vhost config in my puppet manifest file

apache::vhost { '':
    port => '80',
    docroot => '/home/vagrant/projects/Personal/php/site/public',
    serveradmin => '',
    options => ['Indexes','FollowSymLinks','MultiViews'],
    setenv => ["APP_ENV dev"],
    override => ['All'],

Now I want to add these options

EnableSendfile Off
EnableMMAP Off

I googled and found that concat::fragment might just be what I need, so I tried the following:

concat::fragment { "":
      target  => '',
      order   => '01',
      content => '
        EnableSendfile Off
        EnableMMAP Off

NOTE In the target I have also tried with the full path: /etc/apache2/sites-available/ (with same results)

When I do vagrant provision I get this:

-- snip --
==> acs_dev: Warning: Scope(Concat::Fragment[Listen 80]): The $ensure parameter to concat::fragment is deprecated and has no effect.
-- snip --

I assume this worked fine but when I go to the vhos file at /etc/apache2/sites-available/ the EnableSendfile and EnableMMAP are not there.

I am using version 2.0.0 of puppetlabs concat module.

What do I need to do to make this work??

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-05-19 18:11:32 -0500

GregLarkin gravatar image

Looking at the source code for the apache::vhost defined type (, the concat type is configured with numeric order.

I wonder if changing your order => '01' attribute to order => 5 would work better? I would expect the 01 to be converted to numeric, but perhaps the Ruby code that is assembling the fragments silently drops that one.

edit flag offensive delete link more


I found out that you can just add custom_fragment => '# Fragment content', in the vhost and add what you want :)

AntonioCS gravatar imageAntonioCS ( 2015-05-20 04:38:42 -0500 )edit

Ah, I missed that one! Glad that will work for you.

GregLarkin gravatar imageGregLarkin ( 2015-05-20 11:35:33 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2015-05-19 09:11:14 -0500

Seen: 412 times

Last updated: May 19 '15