Uploaded image for project: 'Modules'
  1. Modules
  2. MODULES-5578

IIS : must find suitable provider even when installing IIS in same run

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: iis
    • Labels:
    • Template:
      MODULES Bug Template
    • Acceptance Criteria:
      Hide

      Given a Windows Server that does not have IIS installed and a manifest similar to the below, the code should run without issue on the first pass through puppet.

        # add windows features
        iis_feature { 'Web-WebServer':
          ensure                   => present,
          include_management_tools => true,
        }
        -> iis_feature { 'Web-Asp-Net45':
          ensure => present,
        }
        -> iis_feature { 'Web-AppInit':
          ensure => present,
        }
       
        # remove default web site
        -> iis_site {'Default Web Site':
          ensure          => absent,
          applicationpool => 'DefaultAppPool',
          require         => Iis_feature['Web-WebServer'],
        }
       
        # application in iis
        -> iis_application_pool { 'chocolateyserver':
          ensure                    => 'present',
          state                     => 'started',
          enable32_bit_app_on_win64 => true,
          managed_runtime_version   => 'v4.0',
          start_mode                => 'AlwaysRunning',
          idle_timeout              => '00:00:00',
          restart_time_limit        => '00:00:00',
          require                   => Iis_feature['Web-WebServer'],
        }
        -> iis_site {'chocolateyserver':
          ensure          => 'started',
          physicalpath    => 'c:\somewhere\site',
          applicationpool => 'chocolateyserver',
          preloadenabled  => true,
          bindings        =>  [
            {
              'bindinginformation' => '*:80:',
              'protocol'           => 'http'
            }
          ]
        }
      

      Show
      Given a Windows Server that does not have IIS installed and a manifest similar to the below, the code should run without issue on the first pass through puppet. # add windows features iis_feature { 'Web-WebServer': ensure => present, include_management_tools => true, } -> iis_feature { 'Web-Asp-Net45': ensure => present, } -> iis_feature { 'Web-AppInit': ensure => present, }   # remove default web site -> iis_site {'Default Web Site': ensure => absent, applicationpool => 'DefaultAppPool', require => Iis_feature['Web-WebServer'], }   # application in iis -> iis_application_pool { 'chocolateyserver': ensure => 'present', state => 'started', enable32_bit_app_on_win64 => true, managed_runtime_version => 'v4.0', start_mode => 'AlwaysRunning', idle_timeout => '00:00:00', restart_time_limit => '00:00:00', require => Iis_feature['Web-WebServer'], } -> iis_site {'chocolateyserver': ensure => 'started', physicalpath => 'c:\somewhere\site', applicationpool => 'chocolateyserver', preloadenabled => true, bindings => [ { 'bindinginformation' => '*:80:', 'protocol' => 'http' } ] }
    • Team:
      Windows
    • Method Found:
      Needs Assessment
    • QA Risk Assessment:
      Needs Assessment

      Description

      Basic Info
      Module Version: 4.1.0
      Puppet Version: 5.0.1
      OS Name/Version: Windows Server 2012 R2

      When installing IIS in the same manifest you are setting up iis resources, it fails due to unsuitable providers.

      The problem is likely due to attempting to confine to IIS versions. That is fine, but you need to do that in validate instead of using confine (unless there is a bug in the way the confine is being validated that can be quickly resolved).

      Desired Behavior:

      It should work all in one go. It's a blocker to using the puppetlabs-iis if it can't do this. Although deprecated, we'll need to switch back to puppet-iis which does not have this issue.

      Actual Behavior:

      ==> default: Error: Could not find a suitable provider for iis_site
      ==> default: Error: Could not find a suitable provider for iis_application_pool
      

      Manifest

        # add windows features
        iis_feature { 'Web-WebServer':
          ensure                   => present,
          include_management_tools => true,
        }
        -> iis_feature { 'Web-Asp-Net45':
          ensure => present,
        }
        -> iis_feature { 'Web-AppInit':
          ensure => present,
        }
       
        # remove default web site
        -> iis_site {'Default Web Site':
          ensure          => absent,
          applicationpool => 'DefaultAppPool',
          require         => Iis_feature['Web-WebServer'],
        }
       
        # application in iis
        -> iis_application_pool { 'chocolateyserver':
          ensure                    => 'present',
          state                     => 'started',
          enable32_bit_app_on_win64 => true,
          managed_runtime_version   => 'v4.0',
          start_mode                => 'AlwaysRunning',
          idle_timeout              => '00:00:00',
          restart_time_limit        => '00:00:00',
          require                   => Iis_feature['Web-WebServer'],
        }
        -> iis_site {'chocolateyserver':
          ensure          => 'started',
          physicalpath    => 'c:\somewhere\site',
          applicationpool => 'chocolateyserver',
          preloadenabled  => true,
          bindings        =>  [
            {
              'bindinginformation' => '*:80:',
              'protocol'           => 'http'
            }
          ]
        }
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              james.pogran James Pogran
              Reporter:
              ferventcoder Rob Reynolds
              Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support