-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
Initial stab at issue/1 #2
Open
jcpunk
wants to merge
8
commits into
voxpupuli:master
Choose a base branch
from
jcpunk:issue-1
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 7 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
62ac011
Initial stab at issue/1
jcpunk 5b6f702
Need to add this stanza so we can find it
jcpunk 8910f03
Since I added some things, need to update the counter
jcpunk 3f15a6c
more accurate pathspec
jcpunk db10bd7
reorder regexs for better matching, rescope test...
jcpunk 0ebaae6
Readme text more standardized
jcpunk 3008981
Based on raphink's comments, updated the interface
jcpunk ac2fda2
Based on feedback, a few changes
jcpunk 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 |
---|---|---|
|
@@ -64,6 +64,12 @@ Type documentation can be generated with `puppet doc -r type` or viewed on the | |
|
||
### apache_directive provider | ||
|
||
#### Composite namevars | ||
This type supports composite namevars in order to easily specify the entry you want to manage. The format is: | ||
<directive> of <context> | ||
or | ||
<directive> of <context> in <target> | ||
|
||
#### manage simple entry | ||
|
||
apache_directive { "StartServers": | ||
|
@@ -89,6 +95,7 @@ Type documentation can be generated with `puppet doc -r type` or viewed on the | |
|
||
The `SetEnv` directive is not unique per scope: the first arg identifies the entry we want to update, and needs to be taken into account. For this reason, we set `args_params` to `1`. | ||
|
||
|
||
#### set a value in a given context | ||
|
||
apache_directive { 'StartServers for mpm_prefork_module': | ||
|
@@ -103,6 +110,17 @@ The directive is nested in the context of the `mpm_prefork_module` module, so we | |
|
||
The value of `StartServers` for the `mpm_prefork_module` module will be set/updated to `4`. Note that the `IfModule` entry will not be created if it is missing. | ||
|
||
#### manage entry with composite namevars | ||
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. You need a newline here. |
||
apache_directive { 'Options of Directory[arg=\'"/var/www/html"\']': | ||
ensure => present, | ||
args => ['FollowSymLinks', ], | ||
} | ||
|
||
apache_directive { 'Options of Directory[arg=\'"/var/www/icons"\']': | ||
ensure => present, | ||
args => ['MultiViews', 'FollowSymLinks', ], | ||
} | ||
|
||
|
||
### apache_setenv provider | ||
|
||
|
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 |
---|---|---|
|
@@ -31,6 +31,11 @@ def insync?(is) | |
isnamevar | ||
end | ||
|
||
newparam(:directive) do | ||
desc 'The apache directive to modify' | ||
defaultto self[:name] | ||
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. The Travis CI builds are failing because of this line. What you need instead is: defaultto { @resource[:name] } |
||
end | ||
|
||
newparam(:context) do | ||
desc 'The path where the directive is located. Expressed as an Augeas path expression.' | ||
defaultto '' | ||
|
@@ -50,6 +55,41 @@ def insync?(is) | |
end | ||
|
||
newparam(:target) do | ||
desc 'The config file to use' | ||
desc 'The config file to modify' | ||
end | ||
|
||
def self.title_patterns | ||
identity = lambda { |x| x } | ||
[ | ||
[ | ||
/^((\w+)\s+of\s+(.+)\s+in\s+(.*))$/, | ||
[ | ||
[ :name, identity ], | ||
[ :directive, identity ], | ||
[ :context, identity ], | ||
[ :target, identity ], | ||
] | ||
], | ||
[ | ||
/^((\w+)\s+of\s+(.+))$/, | ||
[ | ||
[ :name, identity ], | ||
[ :directive, identity ], | ||
[ :context, identity ], | ||
] | ||
], | ||
[ | ||
/((.*))/, | ||
[ | ||
[ :name, identity ], | ||
[ :directive, identity ], | ||
] | ||
] | ||
] | ||
end | ||
|
||
autorequire(:file) do | ||
self[:target] | ||
end | ||
|
||
end |
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
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.
That newline seems to have been added by mistake.