Skip to content
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

Allow add action in iis_config_property to support multiple properties #435

Closed

Conversation

jeffreycoe
Copy link
Contributor

@jeffreycoe jeffreycoe commented Oct 11, 2018

Description

The iis_config_property resource does not currently support values which require more than one property. For example, the following command would not be supported currently since the value parameter has a hash which contains multiple keys:

Add-WebConfigurationProperty -PSPath 'MACHINE/WEBROOT/APPHOST' -Location "Default FTP Site" -Filter "/system.ftpServer/security/authorization" -Name "." -Value @{accessType='Allow';users='ftp_user';permissions='Read, Write'}

This PR would update the add action for the iis_config_property resource and allow the value property to use Hash values to support multiple properties.

The property custom resource property would be ignored if passing in a Hash to the value property.

Below are examples of how the custom resource would be used with multiple properties vs a single property:

iis_config_property 'add_http_trace_method' do
  ps_path 'MACHINE/WEBROOT/APPHOST'
  filter 'system.webServer/security/requestFiltering/verbs'
  value(
    verb: 'TRACE',
    allowed: 'False'
  )
  action :add
end

iis_config_property 'configure_iis_test_new_index_default_document' do
  ps_path 'MACHINE/WEBROOT/APPHOST'
  filter '/system.webServer/defaultDocument/files'
  property 'value'
  value 'new-index.html'
  action :add
end

Looking for feedback and suggestions on this implementation. Thanks!

Issues Resolved

Issue #433

Check List

Signed-off-by: Jeffrey Coe <jeffrey.coe@cerner.com>
Signed-off-by: Jeffrey Coe <jeffrey.coe@cerner.com>
Signed-off-by: Jeffrey Coe <jeffrey.coe@cerner.com>
Signed-off-by: Jeffrey Coe <jeffrey.coe@cerner.com>
Signed-off-by: Jeffrey Coe <jeffrey.coe@cerner.com>
Signed-off-by: Jeffrey Coe <jeffrey.coe@cerner.com>
@jeffreycoe
Copy link
Contributor Author

This looks to be a duplicate of #447. Closing PR.

@jeffreycoe jeffreycoe closed this Jun 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant