Skip to content

Commit

Permalink
Convert apache::vhost to use concat fragments.
Browse files Browse the repository at this point in the history
Lint failures fixed:
 - class_parameter_defaults check removed in puppet-lint 1.0
 - alignment for tests/vhost.pp
 - need to add relative
  • Loading branch information
Morgan Haskel committed Aug 20, 2014
1 parent b41cbf3 commit f1d64a0
Show file tree
Hide file tree
Showing 24 changed files with 1,018 additions and 1,784 deletions.
1 change: 0 additions & 1 deletion .puppet-lint.rc
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
--no-single_quote_string_with_variables-check
--no-80chars-check
--no-class_inherits_from_params_class-check
--no-class_parameter_defaults-check
--no-documentation-check
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -774,6 +774,20 @@ The Apache module allows a lot of flexibility in the setup and configuration of

The `vhost` defined type allows you to have specialized configurations for virtual hosts that have requirements outside the defaults. You can set up a default vhost within the base `::apache` class, as well as set a customized vhost as default. Your customized vhost (priority 10) will be privileged over the base class vhost (15).

The `vhost` defined type uses `concat::fragment` to build the configuration file, so if you want to inject custom fragments for pieces of the configuration not supported by default by the defined type, you can simply add a custom fragment. For the `order` parameter for the custom fragment, the `vhost` defined type uses multiples of 10, so any order that isn't a multiple of 10 should work.

```puppet
apache::vhost { "example.com":
docroot => '/var/www/html',
priority => '25',
}
concat::fragment { "example.com-my_custom_fragment":
target => '25-example.com.conf',
order => 11,
content => '# my custom comment',
}
```

If you have a series of specific configurations and do not want a base `::apache` class default vhost, make sure to set the base class `default_vhost` to 'false'.

```puppet
Expand Down
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-lint/tasks/puppet-lint'

PuppetLint.configuration.fail_on_warnings
PuppetLint.configuration.send('relative')
PuppetLint.configuration.send('disable_80chars')
PuppetLint.configuration.send('disable_class_inherits_from_params_class')
PuppetLint.configuration.send('disable_class_parameter_defaults')
PuppetLint.configuration.send('disable_documentation')
PuppetLint.configuration.send('disable_single_quote_string_with_variables')
PuppetLint.configuration.send('disable_only_variable_string')
Expand Down
Loading

0 comments on commit f1d64a0

Please sign in to comment.