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

Migrate win_iis_virtualdirectory #10

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

Yaish25491
Copy link
Collaborator

SUMMARY

Promote the win_iis_virtualdirectory Module from community.windows to microsoft.iis.

ISSUE TYPE
  • New Module Pull Request
COMPONENT NAME

virtualdirectory.ps1
virtualdirectory_info.ps1
virtualdirectory/aliases
virtualdirectory/defaults/main.yml
virtualdirectory/meta/main.yml
virtualdirectory/tasks/main.yml
virtualdirectory/tasks/tests.yml

ADDITIONAL INFORMATION

Promote the win_iis_virtualdirectory:
Creating virtualdirectory (set) module.
Creating virtualdirectory_info (get) module.
Updating Documentation file to ymal format.
Updating tests

Copy link

github-actions bot commented Dec 25, 2024

Docs Build 📝

Thank you for contribution!✨

The docsite for this PR is available for download as an artifact from this run:
https://github.com/ansible-collections/microsoft.iis/actions/runs/13028956583

You can compare to the docs for the main branch here:
https://ansible-collections.github.io/microsoft.iis/branch/main

File changes:

  • A collections/microsoft/iis/virtual_directory_info_module.html
  • A collections/microsoft/iis/virtual_directory_module.html
  • M collections/index_module.html
  • M collections/microsoft/iis/docsite/guide_migration.html
  • M collections/microsoft/iis/index.html
  • M collections/microsoft/iis/web_app_pool_module.html
Click to see the diff comparison.

NOTE: only file modifications are shown here. New and deleted files are excluded.
See the file list and check the published docs to see those files.

diff --git a/home/runner/work/microsoft.iis/microsoft.iis/docsbuild/base/collections/index_module.html b/home/runner/work/microsoft.iis/microsoft.iis/docsbuild/head/collections/index_module.html
index 41555e5..5eab251 100644
--- a/home/runner/work/microsoft.iis/microsoft.iis/docsbuild/base/collections/index_module.html
+++ b/home/runner/work/microsoft.iis/microsoft.iis/docsbuild/head/collections/index_module.html
@@ -120,6 +120,8 @@
 <section id="microsoft-iis">
 <h2>microsoft.iis<a class="headerlink" href="#microsoft-iis" title="Link to this heading"></a></h2>
 <ul class="simple">
+<li><p><a class="reference internal" href="microsoft/iis/virtual_directory_module.html#ansible-collections-microsoft-iis-virtual-directory-module"><span class="std std-ref">microsoft.iis.virtual_directory</span></a> – Configures a virtual directory in IIS</p></li>
+<li><p><a class="reference internal" href="microsoft/iis/virtual_directory_info_module.html#ansible-collections-microsoft-iis-virtual-directory-info-module"><span class="std std-ref">microsoft.iis.virtual_directory_info</span></a> – Retrive information on a virtual directory in IIS</p></li>
 <li><p><a class="reference internal" href="microsoft/iis/web_app_pool_module.html#ansible-collections-microsoft-iis-web-app-pool-module"><span class="std std-ref">microsoft.iis.web_app_pool</span></a> – Configure IIS Web Application Pools</p></li>
 <li><p><a class="reference internal" href="microsoft/iis/web_app_pool_info_module.html#ansible-collections-microsoft-iis-web-app-pool-info-module"><span class="std std-ref">microsoft.iis.web_app_pool_info</span></a> – Get information on IIS Web Application Pools</p></li>
 <li><p><a class="reference internal" href="microsoft/iis/web_application_module.html#ansible-collections-microsoft-iis-web-application-module"><span class="std std-ref">microsoft.iis.web_application</span></a> – Configures IIS web applications</p></li>
diff --git a/home/runner/work/microsoft.iis/microsoft.iis/docsbuild/base/collections/microsoft/iis/docsite/guide_migration.html b/home/runner/work/microsoft.iis/microsoft.iis/docsbuild/head/collections/microsoft/iis/docsite/guide_migration.html
index 73cb198..98d8ccb 100644
--- a/home/runner/work/microsoft.iis/microsoft.iis/docsbuild/base/collections/microsoft/iis/docsite/guide_migration.html
+++ b/home/runner/work/microsoft.iis/microsoft.iis/docsbuild/head/collections/microsoft/iis/docsite/guide_migration.html
@@ -21,7 +21,7 @@
       <script src="../../../../_static/sphinx_highlight.js?v=dc90522c"></script>
     <script src="../../../../_static/js/theme.js"></script>
     <link rel="search" title="Search" href="../../../../search.html" />
-    <link rel="next" title="microsoft.iis.web_app_pool module – Configure IIS Web Application Pools" href="../web_app_pool_module.html" />
+    <link rel="next" title="microsoft.iis.virtual_directory module – Configures a virtual directory in IIS" href="../virtual_directory_module.html" />
     <link rel="prev" title="Microsoft.Iis" href="../index.html" /><!-- extra head elements for Ansible beyond RTD Sphinx Theme -->
 
 
@@ -156,7 +156,7 @@
 
 <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
         <a href="../index.html" class="btn btn-neutral float-left" title="Microsoft.Iis" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
-        <a href="../web_app_pool_module.html" class="btn btn-neutral float-right" title="microsoft.iis.web_app_pool module – Configure IIS Web Application Pools" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
+        <a href="../virtual_directory_module.html" class="btn btn-neutral float-right" title="microsoft.iis.virtual_directory module – Configures a virtual directory in IIS" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
     </div>
 
   <hr/>
diff --git a/home/runner/work/microsoft.iis/microsoft.iis/docsbuild/base/collections/microsoft/iis/index.html b/home/runner/work/microsoft.iis/microsoft.iis/docsbuild/head/collections/microsoft/iis/index.html
index b5e0e95..dbeb278 100644
--- a/home/runner/work/microsoft.iis/microsoft.iis/docsbuild/base/collections/microsoft/iis/index.html
+++ b/home/runner/work/microsoft.iis/microsoft.iis/docsbuild/head/collections/microsoft/iis/index.html
@@ -176,6 +176,8 @@
 <section id="modules">
 <h3>Modules<a class="headerlink" href="#modules" title="Link to this heading"></a></h3>
 <ul class="simple">
+<li><p><a class="reference internal" href="virtual_directory_module.html#ansible-collections-microsoft-iis-virtual-directory-module"><span class="std std-ref">virtual_directory module</span></a> – Configures a virtual directory in IIS</p></li>
+<li><p><a class="reference internal" href="virtual_directory_info_module.html#ansible-collections-microsoft-iis-virtual-directory-info-module"><span class="std std-ref">virtual_directory_info module</span></a> – Retrive information on a virtual directory in IIS</p></li>
 <li><p><a class="reference internal" href="web_app_pool_module.html#ansible-collections-microsoft-iis-web-app-pool-module"><span class="std std-ref">web_app_pool module</span></a> – Configure IIS Web Application Pools</p></li>
 <li><p><a class="reference internal" href="web_app_pool_info_module.html#ansible-collections-microsoft-iis-web-app-pool-info-module"><span class="std std-ref">web_app_pool_info module</span></a> – Get information on IIS Web Application Pools</p></li>
 <li><p><a class="reference internal" href="web_application_module.html#ansible-collections-microsoft-iis-web-application-module"><span class="std std-ref">web_application module</span></a> – Configures IIS web applications</p></li>
diff --git a/home/runner/work/microsoft.iis/microsoft.iis/docsbuild/base/collections/microsoft/iis/web_app_pool_module.html b/home/runner/work/microsoft.iis/microsoft.iis/docsbuild/head/collections/microsoft/iis/web_app_pool_module.html
index d51fe37..36f1010 100644
--- a/home/runner/work/microsoft.iis/microsoft.iis/docsbuild/base/collections/microsoft/iis/web_app_pool_module.html
+++ b/home/runner/work/microsoft.iis/microsoft.iis/docsbuild/head/collections/microsoft/iis/web_app_pool_module.html
@@ -23,7 +23,7 @@
     <script src="../../../_static/js/theme.js"></script>
     <link rel="search" title="Search" href="../../../search.html" />
     <link rel="next" title="microsoft.iis.web_app_pool_info module – Get information on IIS Web Application Pools" href="web_app_pool_info_module.html" />
-    <link rel="prev" title="Migration guide" href="docsite/guide_migration.html" /><!-- extra head elements for Ansible beyond RTD Sphinx Theme -->
+    <link rel="prev" title="microsoft.iis.virtual_directory_info module – Retrive information on a virtual directory in IIS" href="virtual_directory_info_module.html" /><!-- extra head elements for Ansible beyond RTD Sphinx Theme -->
 
 
 
@@ -311,7 +311,7 @@ To check whether it is installed, run <code class="code docutils literal notrans
           
 
 <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
-        <a href="docsite/guide_migration.html" class="btn btn-neutral float-left" title="Migration guide" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
+        <a href="virtual_directory_info_module.html" class="btn btn-neutral float-left" title="microsoft.iis.virtual_directory_info module – Retrive information on a virtual directory in IIS" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
         <a href="web_app_pool_info_module.html" class="btn btn-neutral float-right" title="microsoft.iis.web_app_pool_info module – Get information on IIS Web Application Pools" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
     </div>
 

Copy link

@Yaish25491 Yaish25491 force-pushed the migrate-win_iis_virtualdirectory branch from f42e525 to 836e9b9 Compare December 26, 2024 08:38
Copy link

@Yaish25491 Yaish25491 force-pushed the migrate-win_iis_virtualdirectory branch from 836e9b9 to 0be08d2 Compare December 26, 2024 09:31
Copy link

@Yaish25491 Yaish25491 force-pushed the migrate-win_iis_virtualdirectory branch from 0be08d2 to d101d50 Compare December 26, 2024 11:40
Copy link

@Yaish25491 Yaish25491 force-pushed the migrate-win_iis_virtualdirectory branch 4 times, most recently from bbf8434 to 87dbbc5 Compare December 26, 2024 12:23
Copy link

@Yaish25491 Yaish25491 force-pushed the migrate-win_iis_virtualdirectory branch from 87dbbc5 to d16d71b Compare December 26, 2024 12:47
Copy link

@Yaish25491 Yaish25491 force-pushed the migrate-win_iis_virtualdirectory branch from d16d71b to f6552d2 Compare December 26, 2024 15:02
Copy link

@Yaish25491 Yaish25491 force-pushed the migrate-win_iis_virtualdirectory branch from f6552d2 to d7b8272 Compare December 26, 2024 15:32
Copy link

@Yaish25491 Yaish25491 force-pushed the migrate-win_iis_virtualdirectory branch from d7b8272 to eeedfbf Compare December 26, 2024 15:44
Copy link

@Yaish25491 Yaish25491 force-pushed the migrate-win_iis_virtualdirectory branch from eeedfbf to 25ba101 Compare December 26, 2024 16:41
Copy link

@Yaish25491 Yaish25491 force-pushed the migrate-win_iis_virtualdirectory branch from 25ba101 to d60c5c0 Compare December 29, 2024 08:27
Copy link

@Yaish25491 Yaish25491 force-pushed the migrate-win_iis_virtualdirectory branch from d60c5c0 to b9c4dcf Compare December 29, 2024 09:08
Copy link

@Yaish25491 Yaish25491 force-pushed the migrate-win_iis_virtualdirectory branch 2 times, most recently from 39c209e to 6434db0 Compare December 29, 2024 12:56
Copy link

@Yaish25491 Yaish25491 force-pushed the migrate-win_iis_virtualdirectory branch from 7cbae50 to 8c92378 Compare January 20, 2025 10:04
Copy link

@Yaish25491 Yaish25491 force-pushed the migrate-win_iis_virtualdirectory branch from 8c92378 to bdd2a0d Compare January 20, 2025 11:14
Copy link

plugins/modules/virtualdirectory_info.ps1 Outdated Show resolved Hide resolved
plugins/modules/virtualdirectory_info.ps1 Outdated Show resolved Hide resolved
plugins/modules/virtualdirectory_info.yml Outdated Show resolved Hide resolved
tests/integration/targets/virtualdirectory/tasks/main.yml Outdated Show resolved Hide resolved
@Yaish25491 Yaish25491 force-pushed the migrate-win_iis_virtualdirectory branch from bdd2a0d to bb47024 Compare January 21, 2025 08:24
Copy link

plugins/modules/virtualdirectory_info.ps1 Outdated Show resolved Hide resolved
plugins/modules/virtualdirectory_info.yml Outdated Show resolved Hide resolved
plugins/modules/virtualdirectory_info.yml Outdated Show resolved Hide resolved
plugins/modules/virtualdirectory_info.ps1 Outdated Show resolved Hide resolved
@Yaish25491 Yaish25491 force-pushed the migrate-win_iis_virtualdirectory branch from bb47024 to aa9d4a1 Compare January 23, 2025 12:15
Copy link

jborean93 and others added 6 commits January 23, 2025 14:29
* Fix up docs after migration

* Fix up sanity errors
* fix up sanity ignores

* Bump ansible-windows dep

* Fix bad change for win_region
… (#347)

* win_iis_virtualdirectory: Add credential support and integration test

- Added parameters ('connect_as', 'username', 'password') so that credentials can be set when creating a virtual directory.
- Fixed the method of getting virtual directory information when the parameter 'application' is set.
- Added integration tests.

* Ccreate a changelog fragment

* Add version_added parameter to document
@Yaish25491 Yaish25491 force-pushed the migrate-win_iis_virtualdirectory branch 4 times, most recently from fb91bb8 to 0e3c7f8 Compare January 23, 2025 12:52
Copy link

@Yaish25491 Yaish25491 force-pushed the migrate-win_iis_virtualdirectory branch 2 times, most recently from 6881f85 to e951370 Compare January 26, 2025 08:01
Copy link

@Yaish25491 Yaish25491 force-pushed the migrate-win_iis_virtualdirectory branch from e951370 to 6c39950 Compare January 26, 2025 11:22
Copy link

plugins/modules/virtual_directory_info.ps1 Outdated Show resolved Hide resolved
plugins/modules/virtual_directory_info.yml Show resolved Hide resolved
plugins/modules/virtual_directory_info.yml Show resolved Hide resolved
plugins/modules/virtual_directory_info.ps1 Outdated Show resolved Hide resolved

- assert:
that:
- 'vdir_info.directories[0].physical_path == test_physical_path'
Copy link
Collaborator

Choose a reason for hiding this comment

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

You are not checking username here so the check isn't doing too much.

that:
- 'result.changed == false'

- name: Delete virtual directory and use pass through authentication
Copy link
Collaborator

Choose a reason for hiding this comment

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

You should also have a state: absent check mode test before this one.

- vdir_info.directories | length == 1
- 'vdir_info.directories[0].physical_path == test_physical_path'

- name: Create test application temporary directory
Copy link
Collaborator

Choose a reason for hiding this comment

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

You shouldn't need this, remote_tmp_dir contains a temp directory, we should be re-using that with win_file if we need a custom subdir This way it'll be cleaned up at the end of the test.

- assert:
that:
- vdir_info.directories | length == 1
- 'vdir_info.directories[0].physical_path == test_physical_path'
Copy link
Collaborator

Choose a reason for hiding this comment

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

The module returns more values, we should be testing them all here.

Creating virtualdirectory (set) module.
creating virtualdirectory_info (get) module.
Updating Documentation file to ymal format.
Creating virtualdirectory_info.ymal
Updating tests
Adding virtualdirectory_info tests
@Yaish25491 Yaish25491 force-pushed the migrate-win_iis_virtualdirectory branch from 6c39950 to 610bff1 Compare January 29, 2025 10:07
Copy link

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.

5 participants