Skip to content

(MODULES-3202) Fix install dependencies with custom source #183

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

Merged
merged 1 commit into from
Aug 19, 2016
Merged

(MODULES-3202) Fix install dependencies with custom source #183

merged 1 commit into from
Aug 19, 2016

Conversation

glennsarti
Copy link
Contributor

@glennsarti glennsarti commented Aug 16, 2016

Previously the SQL Server module would try to install .Net Framework 3.5 from a
custom source, however the source was never exposed on the feature or instance
provider and type.

This commit:

  • Adds a new parameter to the feature and instance type called
    windows_feature_source which can be used to set the /Source attriute
    during a call to DISM. See https://support.microsoft.com/en-us/kb/2734782 for
    more information about installing from a custom source
  • Modifies the installation logic so that it only calls DISM once if the feature
    exists. Previously it was called three times.
  • Documents the new parameter to the README
  • Adds the missing source parameter to the feature type in the README
  • Only adds the /Source parameter to the DISM call, if it is specified in the
    resource
  • Modifies the error message to only mentioned the windows_source_location if it
    was specified in the resource
  • Removed redundant call to Install-WindowsFeature

Previously the SQL Server module would try to install .Net Framework 3.5 from a
custom source, however the source was never exposed on the feature or instance
provider and type.

This commit:
- Adds a new parameter to the feature and instance type called
  `windows_feature_source` which can be used to set the `/Source` attriute
  during a call to DISM.  See https://support.microsoft.com/en-us/kb/2734782 for
  more information about installing from a custom source
- Modifies the installation logic so that it only calls DISM once if the feature
  exists.  Previously it was called three times.
- Documents the new parameter to the README
- Adds the missing `source` parameter to the feature type in the README
- Only adds the `/Source` parameter to the DISM call, if it is specified in the
  resource
- Modifies the error message to only mentioned the windows_source_location if it
  was specified in the resource
- Removed redundant call to Install-WindowsFeature
}
Else
{
Write-Host "Failed to install Install .Net Framework 3.5,please make sure the local source is correct."
Write-Host "Installing .Net Framework 3.5, do not close this prompt..."
DISM /Online /Enable-Feature /FeatureName:NetFx3 /All /NoRestart /Quiet /LimitAccess #{ "/Source:\"#{source_location}\"" unless source_location.nil? } | Out-Null
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Depending on the version of Windows (I believe 2008R2 is still supported here), /Alll may fail. Of course this change doesn't change this from what it was, so possibly a new ticket (which may already exist).

@ferventcoder
Copy link
Contributor

I'm 👍 for this. Will pull it in tomorrow after the build is green for the other PR that just got merged. In the meantime, any comments from @puppetlabs/windows?

@ferventcoder ferventcoder merged commit ace9f91 into puppetlabs:master Aug 19, 2016
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.

2 participants