-
-
Notifications
You must be signed in to change notification settings - Fork 875
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch to using concat{} instead of lots of file{} magic. #167
Merged
Merged
Changes from 12 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
6516820
no more Gemfile.lock
2533623
lock serverspec to 0.11.x
a42f971
remove SLES 11 from nodeset
d2ec91d
Don't include RSpecSystemPuppet::Helpers twice
0922eb7
check for 0 or 2 exit code
dd81086
add dummy (but valid) SSL cert/key
9a39249
more coverage for rspec-system
2459844
add puppetlabs-concat dependency
2023ca1
switch mailhost resource to concat pattern
7532832
switch vhost resource to concat pattern
d849c31
switch location resource to concat pattern
eb31df4
Remove vhost and mailhost vhost_autogen.conf
0e1d4ad
Remove unused code in mailhost
3flex a9c445b
Remove unused code in vhost
3flex 684fafc
Remove the now unused file fragments from /tmp
3flex 486d03b
required to remove unused file fragments from /tmp
3flex 2ccd399
add tests to check file fragments are absent
3flex 390b491
ruby 1.8.7 syntax fix
3flex File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,5 @@ pkg/ | |
.librarian/ | ||
.tmp/ | ||
pkg/ | ||
Gemfile.lock | ||
spec/fixtures/ |
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
This file was deleted.
Oops, something went wrong.
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
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
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
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 |
---|---|---|
|
@@ -67,6 +67,13 @@ | |
|
||
validate_array($server_name) | ||
|
||
$file_ensure = $ensure ? { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Probably best to leave this out for now, if it's not being used. |
||
'absent' => absent, | ||
default => 'file', | ||
} | ||
|
||
$config_file = "${nginx::config::nx_conf_dir}/conf.mail.d/${name}.conf" | ||
|
||
# Add IPv6 Logic Check - Nginx service will not start if ipv6 is enabled | ||
# and support does not exist for it in the kernel. | ||
if ($ipv6_enable and !$::ipaddress6) { | ||
|
@@ -80,28 +87,29 @@ | |
} | ||
} | ||
|
||
# Use the File Fragment Pattern to construct the configuration files. | ||
# Create the base configuration file reference. | ||
concat { $config_file: | ||
# Waiting on https://github.com/puppetlabs/puppetlabs-concat/pull/39/files | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here. Good to leave this out. |
||
#ensure => $file_ensure, | ||
owner => 'root', | ||
group => 'root', | ||
mode => '0644', | ||
notify => Class['nginx::service'], | ||
} | ||
|
||
if ($listen_port != $ssl_port) { | ||
file { "${nginx::config::nx_temp_dir}/nginx.mail.d/${name}-001": | ||
ensure => $ensure ? { | ||
'absent' => absent, | ||
default => 'file', | ||
}, | ||
concat::fragment { "${name}-header": | ||
target => $config_file, | ||
content => template('nginx/mailhost/mailhost.erb'), | ||
notify => Class['nginx::service'], | ||
order => '001', | ||
} | ||
} | ||
|
||
# Create SSL File Stubs if SSL is enabled | ||
if ($ssl) { | ||
file { "${nginx::config::nx_temp_dir}/nginx.mail.d/${name}-700-ssl": | ||
ensure => $ensure ? { | ||
'absent' => absent, | ||
default => 'file', | ||
}, | ||
concat::fragment { "${name}-ssl": | ||
target => $config_file, | ||
content => template('nginx/mailhost/mailhost_ssl.erb'), | ||
notify => Class['nginx::service'], | ||
order => '700', | ||
} | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about
ensure => absent
to clean up mess from old concat?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It crossed my mind - I left it out since it's a temp folder anyway so things should get wiped out periodically without help from the module.
I'll add it back so people's systems get cleaned up a little.