-
Notifications
You must be signed in to change notification settings - Fork 73
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
Use concat fragments instead of file resource templates for config #64
Conversation
Results for the two templates.. Before:
After:
|
127f549
to
2f6d157
Compare
👍 excellent work here. |
I would be open to such a change. I'll let Travis do it's thing, but I think 👍 once it's green. |
Awesome work David =D |
@ekohl thanks! Looks like travis is green :) |
mode => '0640', | ||
} | ||
|
||
concat::fragment { 'namedconf_template': |
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.
Use the existing naming scheme for fragments, i.e. named.conf+10-main.dns
or similar.
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.
fixed
👍 looks fine now, thanks. |
The net effect of this change is zero - it's backwards compatible and does not result in any change for users. The concat resources create the files with the same permissions and the concat fragments take care of inserting the templates with the same feature to override the template if need be. However, since concat is now used, consumers of puppet-dns can now insert their own concat fragments without having to maintain their own template. Before this change, if we wanted to diverge slightly from the template, we would need to "fork" the template and maintain our own. We could otherwise edit the file with resources like file_line but this is not idempotent. Spec test coverage for these bits have been improved a bit and standardized as part of the commit.
Missed something with my find/replace in the spec tests, should be good now. |
@dmsimard merged, thanks! |
@brandonweeks do you have any ETA before next release? |
IMHO we can cut a 3.3.1 from current master any time... anybody from @theforeman: any objections? |
No objection from my side |
Released 3.3.1 to the forge. |
- Change file_line resources to concat resources instead to concat a fragment within the puppet-dns concat templates resources. This change depends on an upstream change to puppet-dns which has not yet merged. theforeman/puppet-dns#64 Change-Id: I499f2c7bfe8330ddb3c3d91d5eadcdad9e64e614 Depends-On: I73145a8992292038ab22824d3a858dcc7193fd35
The net effect of this change is zero - it's backwards compatible
and does not result in any change for users.
The concat resources create the files with the same permissions
and the concat fragments take care of inserting the templates with
the same feature to override the template if need be.
However, since concat is now used, consumers of puppet-dns can now
insert their own concat fragments without having to maintain their
own template.
Before this change, if we wanted to diverge slightly from the
template, we would need to "fork" the template and maintain our own.
We could otherwise edit the file with resources like file_line but
this is not idempotent.
Spec test coverage for these bits have been improved a bit and
standardized as part of the commit.