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

iis : iis_virtual_directory unable to create directories with the same name on different sites

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: iis
    • Labels:
      None
    • Environment:

      Window Server 2012/2016 | IIS versions 8.5/10

    • Template:
      MODULES Bug Template
    • Method Found:
      Needs Assessment
    • QA Risk Assessment:
      Needs Assessment

      Description

      Module Version: puppetlabs/IIS 5.0.0**
      Puppet Version: 2019.0.1
      OS Name/Version: Windows Server 2012 R2 / 2016

      I'm trying to create virtual directories with the same names under different sites.

      iis_virtual_directory { "$sitename1_includes":
      ensure => present,
      name => 'includes',
      sitename => "$sitename1",
      physicalpath => 'G:\inetpub\includes',
      }

      iis_virtual_directory { "$sitename2_includes":
        ensure => present,
        name => 'includes',
        sitename => "$sitename2",
        physicalpath => 'G:\inetpub\includes',
      }

      ===============OR===================

      iis_virtual_directory { 'includes':
      ensure => present,
      sitename => "$sitename1",
      physicalpath => 'G:\inetpub\includes',
      }

      iis_virtual_directory { 'includes':
      ensure => present,
      sitename => "$sitename2",
      physicalpath => 'G:\inetpub\includes',
      }

       

      Attempting with the following did not create the correct directories, it creates $sitename/$sitename/$directory:

      iis_virtual_directory { "$sitename1/includes":
      ensure => present,
      sitename => "$sitename1",
      physicalpath => 'G:\inetpub\includes',
      }

      iis_virtual_directory { "$sitename2/includes":
         ensure => present,
         sitename => "$sitename2",
        physicalpath => 'G:\inetpub\includes',
      }

      As a work around, I can create a powershell script to create if it doesn't exist, or manually create the directories

      Desired Behavior:

      Create virtual directories with the same name in different sites

      Actual Behavior:

      Errors stating that there is a duplicate directory

      Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Resource Statement, Cannot alias Iis_virtual_directory[$sitename2_includes] to ["includes"] at (file: /etc/puppetlabs/$manifest2.pp, line: 95); resource ["Iis_virtual_directory", "includes"] already declared (file: /etc/puppetlabs/$manifest1.pp, line: 95) (file: /etc/puppetlabs/manifest2.pp, line: 95, column: 7) on $servername.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              bcoffen Brittany Coffen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:

                  Zendesk Support