forked from aws/opsworks-cookbooks
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This file is added to enable improved user experience when overriding attributes. Today customers often override the complete file, which will back-fire when OpsWorks introduces new attributes. By moving out customer attribute changes to separate files, we make it easier for the customer to keep track of their changes. It is also easier for OpsWorks to improve the cookbooks. Once agreed, all cookbooks would have a 'attributes/customize.rb'.
- Loading branch information
Showing
3 changed files
with
59 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,22 @@ | |
# limitations under the License. | ||
# | ||
|
||
# Where the various parts of apache are | ||
### | ||
# Do not use this file to override the apache2 cookbook's default | ||
# attributes. Instead, please use the customize.rb attributes file, | ||
# which will keep your adjustments separate from the AWS OpsWorks | ||
# codebase and make it easier to upgrade. | ||
# | ||
# However, you should not edit customize.rb directly. Instead, create | ||
# "apache2/attributes/customize.rb" in your cookbook repository and | ||
# put the overrides in YOUR customize.rb file. | ||
# | ||
# Do NOT create an 'apache2/attributes/apache.rb' in your cookbooks. Doing so | ||
# would completely override this file and might cause upgrade issues. | ||
# | ||
# See also: http://docs.aws.amazon.com/opsworks/latest/userguide/customizing.html | ||
### | ||
|
||
case node[:platform] | ||
when 'redhat','centos','fedora','amazon' | ||
default[:apache][:dir] = '/etc/httpd' | ||
|
@@ -51,11 +66,6 @@ | |
raise 'Bailing out, unknown platform.' | ||
end | ||
|
||
### | ||
# These settings need the unless, since we want them to be tunable, | ||
# and we don't want to override the tunings. | ||
### | ||
|
||
# General settings | ||
default[:apache][:listen_ports] = [ '80','443' ] | ||
default[:apache][:contact] = '[email protected]' | ||
|
@@ -103,3 +113,5 @@ | |
default[:apache][:logrotate][:mode] = '640' | ||
default[:apache][:logrotate][:owner] = 'root' | ||
default[:apache][:logrotate][:group] = 'adm' | ||
|
||
include_attribute 'apache2::customize' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
### | ||
# This is the place to override the apache2 cookbook's default attributes. | ||
# | ||
# Do not edit THIS file directly. Instead, create | ||
# "apache2/attributes/customize.rb" in your cookbook repository and | ||
# put the overrides in YOUR customize.rb file. | ||
### | ||
|
||
# The following shows how to override the Apache contact and timeout settings: | ||
# | ||
#normal[:apache][:contact] = '[email protected]' | ||
#normal[:apache][:timeout] = 60 |