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

LAPS lookup plugin #102

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

LAPS lookup plugin #102

wants to merge 1 commit into from

Conversation

no-12
Copy link

@no-12 no-12 commented Feb 28, 2024

SUMMARY

Adds a new LAPS lookup plugin

Because of this comment ansible-collections/community.windows#527 by @jborean93 it looks like community.windows.laps_password is no longer in active development.
So I decided to implement of a new lookup plugin that lives inside microsoft.ad, because the code of this lookup plugin heavily relies on the same implementations used by the microsoft.ad.ldap inventory plugin.

This is only a first draft. No automated tests added and I haven't done any manual testing yet because I have no working LAPS setup by hand.

Please let me no if this is something that has the potential to get merged, so I can add some tests

ISSUE TYPE
  • New Module Pull Request
COMPONENT NAME

laps

Copy link

github-actions bot commented Feb 28, 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.ad/actions/runs/8118582971

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

File changes:

  • A collections/index_lookup.html
  • A collections/microsoft/ad/laps_lookup.html
  • M collections/environment_variables.html
  • M collections/index.html
  • M collections/index_filter.html
  • M collections/index_inventory.html
  • M collections/index_module.html
  • M collections/microsoft/ad/as_datetime_filter.html
  • M collections/microsoft/ad/as_guid_filter.html
  • M collections/microsoft/ad/as_sid_filter.html
  • M collections/microsoft/ad/computer_module.html
  • M collections/microsoft/ad/debug_ldap_client_module.html
  • M collections/microsoft/ad/dn_escape_filter.html
  • M collections/microsoft/ad/docsite/guide_attributes.html
  • M collections/microsoft/ad/docsite/guide_ldap_connection.html
  • M collections/microsoft/ad/docsite/guide_ldap_inventory.html
  • M collections/microsoft/ad/docsite/guide_list_values.html
  • M collections/microsoft/ad/docsite/guide_migration.html
  • M collections/microsoft/ad/domain_controller_module.html
  • M collections/microsoft/ad/domain_module.html
  • M collections/microsoft/ad/group_module.html
  • M collections/microsoft/ad/index.html
  • M collections/microsoft/ad/ldap_inventory.html
  • M collections/microsoft/ad/membership_module.html
  • M collections/microsoft/ad/object_info_module.html
  • M collections/microsoft/ad/object_module.html
  • M collections/microsoft/ad/offline_join_module.html
  • M collections/microsoft/ad/ou_module.html
  • M collections/microsoft/ad/parse_dn_filter.html
  • M collections/microsoft/ad/user_module.html
  • M collections/microsoft/index.html
  • M index.html
  • M search.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.ad/microsoft.ad/docsbuild/base/collections/environment_variables.html b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/environment_variables.html
index 2319e92..a76a271 100644
--- a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/environment_variables.html
+++ b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/environment_variables.html
@@ -82,6 +82,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="index_filter.html">Index of all Filter Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="index_inventory.html">Index of all Inventory Plugins</a></li>
+<li class="toctree-l1"><a class="reference internal" href="index_lookup.html">Index of all Lookup Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="index_module.html">Index of all Modules</a></li>
 </ul>
 <p class="caption" role="heading"><span class="caption-text">Reference indexes:</span></p>
@@ -141,6 +142,7 @@ Environment variables used by the ansible-core configuration are documented in <
 <p>Kerberos support requires the <code class="docutils literal notranslate"><span class="pre">pyspnego[kerberos]</span></code> extras to be installed.</p>
 <p>See <a class="reference internal" href="microsoft/ad/docsite/guide_ldap_connection.html#ansible-collections-microsoft-ad-docsite-guide-ldap-connection-authentication"><span class="std std-ref">LDAP authentication</span></a> for more information.</p>
 <p><em>Used by:</em>
+<a class="reference internal" href="microsoft/ad/laps_lookup.html#ansible-collections-microsoft-ad-laps-lookup"><span class="std std-ref">microsoft.ad.laps lookup plugin</span></a>,
 <a class="reference internal" href="microsoft/ad/ldap_inventory.html#ansible-collections-microsoft-ad-ldap-inventory"><span class="std std-ref">microsoft.ad.ldap inventory plugin</span></a></p>
 </dd></dl>
 
@@ -150,6 +152,7 @@ Environment variables used by the ansible-core configuration are documented in <
 <dd><p>Can be the path to a CA certificate PEM or DER file, directory of PEM certificates, or the CA certificate PEM string that is used for certificate validation.</p>
 <p>If omitted, the default CA store used for validation is dependent on the current Python settings.</p>
 <p><em>Used by:</em>
+<a class="reference internal" href="microsoft/ad/laps_lookup.html#ansible-collections-microsoft-ad-laps-lookup"><span class="std std-ref">microsoft.ad.laps lookup plugin</span></a>,
 <a class="reference internal" href="microsoft/ad/ldap_inventory.html#ansible-collections-microsoft-ad-ldap-inventory"><span class="std std-ref">microsoft.ad.ldap inventory plugin</span></a></p>
 </dd></dl>
 
@@ -163,6 +166,7 @@ Environment variables used by the ansible-core configuration are documented in <
 <p><code class="docutils literal notranslate"><span class="pre">ignore_hostname</span></code> will validate the CA trust chain but will ignore any hostname checks performed by TLS.</p>
 <p>See <a class="reference internal" href="microsoft/ad/docsite/guide_ldap_connection.html#ansible-collections-microsoft-ad-docsite-guide-ldap-connection-cert-validation"><span class="std std-ref">Certificate validation</span></a> for more information.</p>
 <p><em>Used by:</em>
+<a class="reference internal" href="microsoft/ad/laps_lookup.html#ansible-collections-microsoft-ad-laps-lookup"><span class="std std-ref">microsoft.ad.laps lookup plugin</span></a>,
 <a class="reference internal" href="microsoft/ad/ldap_inventory.html#ansible-collections-microsoft-ad-ldap-inventory"><span class="std std-ref">microsoft.ad.ldap inventory plugin</span></a></p>
 </dd></dl>
 
@@ -175,6 +179,7 @@ Environment variables used by the ansible-core configuration are documented in <
 <p>Use <em>certificate_key</em> if the certificate specified does not contain the key.</p>
 <p>Use <em>certificate_password</em> if the key is encrypted with a password.</p>
 <p><em>Used by:</em>
+<a class="reference internal" href="microsoft/ad/laps_lookup.html#ansible-collections-microsoft-ad-laps-lookup"><span class="std std-ref">microsoft.ad.laps lookup plugin</span></a>,
 <a class="reference internal" href="microsoft/ad/ldap_inventory.html#ansible-collections-microsoft-ad-ldap-inventory"><span class="std std-ref">microsoft.ad.ldap inventory plugin</span></a></p>
 </dd></dl>
 
@@ -185,6 +190,7 @@ Environment variables used by the ansible-core configuration are documented in <
 <p>The value can either be a path to a file containing the key in the PEM or DER encoded form, or it can be the string of a PEM encoded key.</p>
 <p>Use <em>certificate_password</em> if the key is encrypted with a password.</p>
 <p><em>Used by:</em>
+<a class="reference internal" href="microsoft/ad/laps_lookup.html#ansible-collections-microsoft-ad-laps-lookup"><span class="std std-ref">microsoft.ad.laps lookup plugin</span></a>,
 <a class="reference internal" href="microsoft/ad/ldap_inventory.html#ansible-collections-microsoft-ad-ldap-inventory"><span class="std std-ref">microsoft.ad.ldap inventory plugin</span></a></p>
 </dd></dl>
 
@@ -193,6 +199,7 @@ Environment variables used by the ansible-core configuration are documented in <
 <span class="sig-name descname"><span class="pre">MICROSOFT_AD_LDAP_CERTIFICATE_PASSWORD</span></span><a class="headerlink" href="#envvar-MICROSOFT_AD_LDAP_CERTIFICATE_PASSWORD" title="Link to this definition"></a></dt>
 <dd><p>The password used to decrypt the certificate key specified by <em>certificate</em> or <em>certificate_key</em>.</p>
 <p><em>Used by:</em>
+<a class="reference internal" href="microsoft/ad/laps_lookup.html#ansible-collections-microsoft-ad-laps-lookup"><span class="std std-ref">microsoft.ad.laps lookup plugin</span></a>,
 <a class="reference internal" href="microsoft/ad/ldap_inventory.html#ansible-collections-microsoft-ad-ldap-inventory"><span class="std std-ref">microsoft.ad.ldap inventory plugin</span></a></p>
 </dd></dl>
 
@@ -201,6 +208,7 @@ Environment variables used by the ansible-core configuration are documented in <
 <span class="sig-name descname"><span class="pre">MICROSOFT_AD_LDAP_CONNECTION_TIMEOUT</span></span><a class="headerlink" href="#envvar-MICROSOFT_AD_LDAP_CONNECTION_TIMEOUT" title="Link to this definition"></a></dt>
 <dd><p>The timeout in seconds to wait until the connection is established before failing.</p>
 <p><em>Used by:</em>
+<a class="reference internal" href="microsoft/ad/laps_lookup.html#ansible-collections-microsoft-ad-laps-lookup"><span class="std std-ref">microsoft.ad.laps lookup plugin</span></a>,
 <a class="reference internal" href="microsoft/ad/ldap_inventory.html#ansible-collections-microsoft-ad-ldap-inventory"><span class="std std-ref">microsoft.ad.ldap inventory plugin</span></a></p>
 </dd></dl>
 
@@ -212,6 +220,7 @@ Environment variables used by the ansible-core configuration are documented in <
 <p>The <em>auth_protocol</em> <code class="docutils literal notranslate"><span class="pre">negotiate</span></code>, <code class="docutils literal notranslate"><span class="pre">kerberos</span></code>, and <code class="docutils literal notranslate"><span class="pre">ntlm</span></code> all support encryption over LDAP whereas <code class="docutils literal notranslate"><span class="pre">simple</span></code> does not.</p>
 <p>If using <code class="docutils literal notranslate"><span class="pre">auth_protocol=simple</span></code> over LDAP without TLS then this must be set to <code class="docutils literal notranslate"><span class="pre">False</span></code>. As no encryption is used, all traffic will be in plaintext and should be avoided.</p>
 <p><em>Used by:</em>
+<a class="reference internal" href="microsoft/ad/laps_lookup.html#ansible-collections-microsoft-ad-laps-lookup"><span class="std std-ref">microsoft.ad.laps lookup plugin</span></a>,
 <a class="reference internal" href="microsoft/ad/ldap_inventory.html#ansible-collections-microsoft-ad-ldap-inventory"><span class="std std-ref">microsoft.ad.ldap inventory plugin</span></a></p>
 </dd></dl>
 
@@ -222,6 +231,7 @@ Environment variables used by the ansible-core configuration are documented in <
 <p>If <em>auth_protocol</em> is <code class="docutils literal notranslate"><span class="pre">simple</span></code> and no password is specified, the bind will be performed as an unauthenticated bind.</p>
 <p>If <em>auth_protocol</em> is <code class="docutils literal notranslate"><span class="pre">negotiate</span></code>, <code class="docutils literal notranslate"><span class="pre">kerberos</span></code>, or <code class="docutils literal notranslate"><span class="pre">ntlm</span></code> and no password is specified, it will attempt to use the local cached credential specified by <em>username</em> if available.</p>
 <p><em>Used by:</em>
+<a class="reference internal" href="microsoft/ad/laps_lookup.html#ansible-collections-microsoft-ad-laps-lookup"><span class="std std-ref">microsoft.ad.laps lookup plugin</span></a>,
 <a class="reference internal" href="microsoft/ad/ldap_inventory.html#ansible-collections-microsoft-ad-ldap-inventory"><span class="std std-ref">microsoft.ad.ldap inventory plugin</span></a></p>
 </dd></dl>
 
@@ -232,6 +242,7 @@ Environment variables used by the ansible-core configuration are documented in <
 <p>Port 389 is used for LDAP and port 686 is used for LDAPS.</p>
 <p>Defaults to port <code class="docutils literal notranslate"><span class="pre">636</span></code> if <code class="docutils literal notranslate"><span class="pre">tls_mode=ldaps</span></code> otherwise <code class="docutils literal notranslate"><span class="pre">389</span></code>.</p>
 <p><em>Used by:</em>
+<a class="reference internal" href="microsoft/ad/laps_lookup.html#ansible-collections-microsoft-ad-laps-lookup"><span class="std std-ref">microsoft.ad.laps lookup plugin</span></a>,
 <a class="reference internal" href="microsoft/ad/ldap_inventory.html#ansible-collections-microsoft-ad-ldap-inventory"><span class="std std-ref">microsoft.ad.ldap inventory plugin</span></a></p>
 </dd></dl>
 
@@ -242,6 +253,7 @@ Environment variables used by the ansible-core configuration are documented in <
 <p>If not specified the server will be derived from the current krb5.conf <code class="docutils literal notranslate"><span class="pre">default_realm</span></code> setting and with an SRV DNS lookup.</p>
 <p>See <a class="reference internal" href="microsoft/ad/docsite/guide_ldap_connection.html#ansible-collections-microsoft-ad-docsite-guide-ldap-connection-server-lookup"><span class="std std-ref">Server lookup</span></a> for more information.</p>
 <p><em>Used by:</em>
+<a class="reference internal" href="microsoft/ad/laps_lookup.html#ansible-collections-microsoft-ad-laps-lookup"><span class="std std-ref">microsoft.ad.laps lookup plugin</span></a>,
 <a class="reference internal" href="microsoft/ad/ldap_inventory.html#ansible-collections-microsoft-ad-ldap-inventory"><span class="std std-ref">microsoft.ad.ldap inventory plugin</span></a></p>
 </dd></dl>
 
@@ -254,6 +266,7 @@ Environment variables used by the ansible-core configuration are documented in <
 <p><code class="docutils literal notranslate"><span class="pre">start_tls</span></code> will connect over LDAP (port 389) and perform the StartTLS operation before the authentication bind.</p>
 <p>It is recommended to use <code class="docutils literal notranslate"><span class="pre">ldaps</span></code> over <code class="docutils literal notranslate"><span class="pre">start_tls</span></code> if TLS is going to be used.</p>
 <p><em>Used by:</em>
+<a class="reference internal" href="microsoft/ad/laps_lookup.html#ansible-collections-microsoft-ad-laps-lookup"><span class="std std-ref">microsoft.ad.laps lookup plugin</span></a>,
 <a class="reference internal" href="microsoft/ad/ldap_inventory.html#ansible-collections-microsoft-ad-ldap-inventory"><span class="std std-ref">microsoft.ad.ldap inventory plugin</span></a></p>
 </dd></dl>
 
@@ -264,6 +277,7 @@ Environment variables used by the ansible-core configuration are documented in <
 <p>If <em>auth_protocol</em> is <code class="docutils literal notranslate"><span class="pre">simple</span></code> and no username is specified, anonymous authentication is used.</p>
 <p>If <em>auth_protocol</em> is <code class="docutils literal notranslate"><span class="pre">negotiate</span></code>, <code class="docutils literal notranslate"><span class="pre">kerberos</span></code>, or <code class="docutils literal notranslate"><span class="pre">ntlm</span></code> and no username is specified, it will attempt to use the local cached credential if available, for example one retrieved by <code class="docutils literal notranslate"><span class="pre">kinit</span></code>.</p>
 <p><em>Used by:</em>
+<a class="reference internal" href="microsoft/ad/laps_lookup.html#ansible-collections-microsoft-ad-laps-lookup"><span class="std std-ref">microsoft.ad.laps lookup plugin</span></a>,
 <a class="reference internal" href="microsoft/ad/ldap_inventory.html#ansible-collections-microsoft-ad-ldap-inventory"><span class="std std-ref">microsoft.ad.ldap inventory plugin</span></a></p>
 </dd></dl>
 
diff --git a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/index.html b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/index.html
index 5e93894..ce08a79 100644
--- a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/index.html
+++ b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/index.html
@@ -86,6 +86,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="index_filter.html">Index of all Filter Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="index_inventory.html">Index of all Inventory Plugins</a></li>
+<li class="toctree-l1"><a class="reference internal" href="index_lookup.html">Index of all Lookup Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="index_module.html">Index of all Modules</a></li>
 </ul>
 <p class="caption" role="heading"><span class="caption-text">Reference indexes:</span></p>
diff --git a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/index_filter.html b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/index_filter.html
index 9e61e9c..e788af7 100644
--- a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/index_filter.html
+++ b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/index_filter.html
@@ -25,7 +25,7 @@
     <script src="../_static/js/theme.js"></script>
     <link rel="search" title="Search" href="../search.html" />
     <link rel="next" title="Index of all Inventory Plugins" href="index_inventory.html" />
-    <link rel="prev" title="microsoft.ad.ldap inventory – Inventory plugin for Active Directory" href="microsoft/ad/ldap_inventory.html" /><!-- extra head elements for Ansible beyond RTD Sphinx Theme -->
+    <link rel="prev" title="microsoft.ad.laps lookup – Inventory plugin for Active Directory" href="microsoft/ad/laps_lookup.html" /><!-- extra head elements for Ansible beyond RTD Sphinx Theme -->
 
 
 
@@ -86,6 +86,7 @@
 </ul>
 </li>
 <li class="toctree-l1"><a class="reference internal" href="index_inventory.html">Index of all Inventory Plugins</a></li>
+<li class="toctree-l1"><a class="reference internal" href="index_lookup.html">Index of all Lookup Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="index_module.html">Index of all Modules</a></li>
 </ul>
 <p class="caption" role="heading"><span class="caption-text">Reference indexes:</span></p>
@@ -139,7 +140,7 @@
           
 
 <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
-        <a href="microsoft/ad/ldap_inventory.html" class="btn btn-neutral float-left" title="microsoft.ad.ldap inventory – Inventory plugin for Active Directory" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
+        <a href="microsoft/ad/laps_lookup.html" class="btn btn-neutral float-left" title="microsoft.ad.laps lookup – Inventory plugin for Active Directory" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
         <a href="index_inventory.html" class="btn btn-neutral float-right" title="Index of all Inventory Plugins" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
     </div>
 
diff --git a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/index_inventory.html b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/index_inventory.html
index 3425049..c114f96 100644
--- a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/index_inventory.html
+++ b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/index_inventory.html
@@ -24,7 +24,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="Index of all Modules" href="index_module.html" />
+    <link rel="next" title="Index of all Lookup Plugins" href="index_lookup.html" />
     <link rel="prev" title="Index of all Filter Plugins" href="index_filter.html" /><!-- extra head elements for Ansible beyond RTD Sphinx Theme -->
 
 
@@ -86,6 +86,7 @@
 <li class="toctree-l2"><a class="reference internal" href="#microsoft-ad">microsoft.ad</a></li>
 </ul>
 </li>
+<li class="toctree-l1"><a class="reference internal" href="index_lookup.html">Index of all Lookup Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="index_module.html">Index of all Modules</a></li>
 </ul>
 <p class="caption" role="heading"><span class="caption-text">Reference indexes:</span></p>
@@ -136,7 +137,7 @@
 
 <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
         <a href="index_filter.html" class="btn btn-neutral float-left" title="Index of all Filter Plugins" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
-        <a href="index_module.html" class="btn btn-neutral float-right" title="Index of all Modules" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
+        <a href="index_lookup.html" class="btn btn-neutral float-right" title="Index of all Lookup Plugins" 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.ad/microsoft.ad/docsbuild/base/collections/index_module.html b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/index_module.html
index 37eebfd..951bbc8 100644
--- a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/index_module.html
+++ b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/index_module.html
@@ -25,7 +25,7 @@
     <script src="../_static/js/theme.js"></script>
     <link rel="search" title="Search" href="../search.html" />
     <link rel="next" title="Index of all Collection Environment Variables" href="environment_variables.html" />
-    <link rel="prev" title="Index of all Inventory Plugins" href="index_inventory.html" /><!-- extra head elements for Ansible beyond RTD Sphinx Theme -->
+    <link rel="prev" title="Index of all Lookup Plugins" href="index_lookup.html" /><!-- extra head elements for Ansible beyond RTD Sphinx Theme -->
 
 
 
@@ -83,6 +83,7 @@
 <ul class="current">
 <li class="toctree-l1"><a class="reference internal" href="index_filter.html">Index of all Filter Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="index_inventory.html">Index of all Inventory Plugins</a></li>
+<li class="toctree-l1"><a class="reference internal" href="index_lookup.html">Index of all Lookup Plugins</a></li>
 <li class="toctree-l1 current"><a class="current reference internal" href="#">Index of all Modules</a><ul>
 <li class="toctree-l2"><a class="reference internal" href="#microsoft-ad">microsoft.ad</a></li>
 </ul>
@@ -145,7 +146,7 @@
           
 
 <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
-        <a href="index_inventory.html" class="btn btn-neutral float-left" title="Index of all Inventory Plugins" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
+        <a href="index_lookup.html" class="btn btn-neutral float-left" title="Index of all Lookup Plugins" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
         <a href="environment_variables.html" class="btn btn-neutral float-right" title="Index of all Collection Environment Variables" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
     </div>
 
diff --git a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/microsoft/ad/as_datetime_filter.html b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/microsoft/ad/as_datetime_filter.html
index f2c42a1..a847584 100644
--- a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/microsoft/ad/as_datetime_filter.html
+++ b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/microsoft/ad/as_datetime_filter.html
@@ -95,6 +95,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="../../index_filter.html">Index of all Filter Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../index_inventory.html">Index of all Inventory Plugins</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../index_lookup.html">Index of all Lookup Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../index_module.html">Index of all Modules</a></li>
 </ul>
 <p class="caption" role="heading"><span class="caption-text">Reference indexes:</span></p>
diff --git a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/microsoft/ad/as_guid_filter.html b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/microsoft/ad/as_guid_filter.html
index 35313dd..468c0f3 100644
--- a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/microsoft/ad/as_guid_filter.html
+++ b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/microsoft/ad/as_guid_filter.html
@@ -95,6 +95,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="../../index_filter.html">Index of all Filter Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../index_inventory.html">Index of all Inventory Plugins</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../index_lookup.html">Index of all Lookup Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../index_module.html">Index of all Modules</a></li>
 </ul>
 <p class="caption" role="heading"><span class="caption-text">Reference indexes:</span></p>
diff --git a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/microsoft/ad/as_sid_filter.html b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/microsoft/ad/as_sid_filter.html
index e26607b..548b662 100644
--- a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/microsoft/ad/as_sid_filter.html
+++ b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/microsoft/ad/as_sid_filter.html
@@ -95,6 +95,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="../../index_filter.html">Index of all Filter Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../index_inventory.html">Index of all Inventory Plugins</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../index_lookup.html">Index of all Lookup Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../index_module.html">Index of all Modules</a></li>
 </ul>
 <p class="caption" role="heading"><span class="caption-text">Reference indexes:</span></p>
diff --git a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/microsoft/ad/computer_module.html b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/microsoft/ad/computer_module.html
index 0f2458d..19e9e0a 100644
--- a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/microsoft/ad/computer_module.html
+++ b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/microsoft/ad/computer_module.html
@@ -95,6 +95,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="../../index_filter.html">Index of all Filter Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../index_inventory.html">Index of all Inventory Plugins</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../index_lookup.html">Index of all Lookup Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../index_module.html">Index of all Modules</a></li>
 </ul>
 <p class="caption" role="heading"><span class="caption-text">Reference indexes:</span></p>
diff --git a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/microsoft/ad/debug_ldap_client_module.html b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/microsoft/ad/debug_ldap_client_module.html
index 05d900d..f9d70d3 100644
--- a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/microsoft/ad/debug_ldap_client_module.html
+++ b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/microsoft/ad/debug_ldap_client_module.html
@@ -95,6 +95,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="../../index_filter.html">Index of all Filter Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../index_inventory.html">Index of all Inventory Plugins</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../index_lookup.html">Index of all Lookup Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../index_module.html">Index of all Modules</a></li>
 </ul>
 <p class="caption" role="heading"><span class="caption-text">Reference indexes:</span></p>
diff --git a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/microsoft/ad/dn_escape_filter.html b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/microsoft/ad/dn_escape_filter.html
index 7416ceb..0378530 100644
--- a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/microsoft/ad/dn_escape_filter.html
+++ b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/microsoft/ad/dn_escape_filter.html
@@ -95,6 +95,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="../../index_filter.html">Index of all Filter Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../index_inventory.html">Index of all Inventory Plugins</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../index_lookup.html">Index of all Lookup Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../index_module.html">Index of all Modules</a></li>
 </ul>
 <p class="caption" role="heading"><span class="caption-text">Reference indexes:</span></p>
diff --git a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/microsoft/ad/docsite/guide_attributes.html b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/microsoft/ad/docsite/guide_attributes.html
index ceb1815..4821709 100644
--- a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/microsoft/ad/docsite/guide_attributes.html
+++ b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/microsoft/ad/docsite/guide_attributes.html
@@ -94,6 +94,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="../../../index_filter.html">Index of all Filter Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../../index_inventory.html">Index of all Inventory Plugins</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../index_lookup.html">Index of all Lookup Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../../index_module.html">Index of all Modules</a></li>
 </ul>
 <p class="caption" role="heading"><span class="caption-text">Reference indexes:</span></p>
diff --git a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/microsoft/ad/docsite/guide_ldap_connection.html b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/microsoft/ad/docsite/guide_ldap_connection.html
index 6cc2f06..f5018b1 100644
--- a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/microsoft/ad/docsite/guide_ldap_connection.html
+++ b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/microsoft/ad/docsite/guide_ldap_connection.html
@@ -94,6 +94,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="../../../index_filter.html">Index of all Filter Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../../index_inventory.html">Index of all Inventory Plugins</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../index_lookup.html">Index of all Lookup Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../../index_module.html">Index of all Modules</a></li>
 </ul>
 <p class="caption" role="heading"><span class="caption-text">Reference indexes:</span></p>
diff --git a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/microsoft/ad/docsite/guide_ldap_inventory.html b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/microsoft/ad/docsite/guide_ldap_inventory.html
index e11fe18..bec9e67 100644
--- a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/microsoft/ad/docsite/guide_ldap_inventory.html
+++ b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/microsoft/ad/docsite/guide_ldap_inventory.html
@@ -94,6 +94,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="../../../index_filter.html">Index of all Filter Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../../index_inventory.html">Index of all Inventory Plugins</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../index_lookup.html">Index of all Lookup Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../../index_module.html">Index of all Modules</a></li>
 </ul>
 <p class="caption" role="heading"><span class="caption-text">Reference indexes:</span></p>
diff --git a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/microsoft/ad/docsite/guide_list_values.html b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/microsoft/ad/docsite/guide_list_values.html
index 4638a57..f585d81 100644
--- a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/microsoft/ad/docsite/guide_list_values.html
+++ b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/microsoft/ad/docsite/guide_list_values.html
@@ -94,6 +94,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="../../../index_filter.html">Index of all Filter Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../../index_inventory.html">Index of all Inventory Plugins</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../index_lookup.html">Index of all Lookup Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../../index_module.html">Index of all Modules</a></li>
 </ul>
 <p class="caption" role="heading"><span class="caption-text">Reference indexes:</span></p>
diff --git a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/microsoft/ad/docsite/guide_migration.html b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/microsoft/ad/docsite/guide_migration.html
index f420d7d..ba43b02 100644
--- a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/microsoft/ad/docsite/guide_migration.html
+++ b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/microsoft/ad/docsite/guide_migration.html
@@ -94,6 +94,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="../../../index_filter.html">Index of all Filter Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../../index_inventory.html">Index of all Inventory Plugins</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../../index_lookup.html">Index of all Lookup Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../../index_module.html">Index of all Modules</a></li>
 </ul>
 <p class="caption" role="heading"><span class="caption-text">Reference indexes:</span></p>
diff --git a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/microsoft/ad/domain_controller_module.html b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/microsoft/ad/domain_controller_module.html
index 704437e..257e1f1 100644
--- a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/microsoft/ad/domain_controller_module.html
+++ b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/microsoft/ad/domain_controller_module.html
@@ -95,6 +95,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="../../index_filter.html">Index of all Filter Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../index_inventory.html">Index of all Inventory Plugins</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../index_lookup.html">Index of all Lookup Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../index_module.html">Index of all Modules</a></li>
 </ul>
 <p class="caption" role="heading"><span class="caption-text">Reference indexes:</span></p>
diff --git a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/microsoft/ad/domain_module.html b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/microsoft/ad/domain_module.html
index a62deda..f9208e0 100644
--- a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/microsoft/ad/domain_module.html
+++ b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/microsoft/ad/domain_module.html
@@ -95,6 +95,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="../../index_filter.html">Index of all Filter Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../index_inventory.html">Index of all Inventory Plugins</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../index_lookup.html">Index of all Lookup Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../index_module.html">Index of all Modules</a></li>
 </ul>
 <p class="caption" role="heading"><span class="caption-text">Reference indexes:</span></p>
diff --git a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/microsoft/ad/group_module.html b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/microsoft/ad/group_module.html
index b6b0d35..5c2de25 100644
--- a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/microsoft/ad/group_module.html
+++ b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/microsoft/ad/group_module.html
@@ -95,6 +95,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="../../index_filter.html">Index of all Filter Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../index_inventory.html">Index of all Inventory Plugins</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../index_lookup.html">Index of all Lookup Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../index_module.html">Index of all Modules</a></li>
 </ul>
 <p class="caption" role="heading"><span class="caption-text">Reference indexes:</span></p>
diff --git a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/microsoft/ad/index.html b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/microsoft/ad/index.html
index 896b3b1..156fdc0 100644
--- a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/microsoft/ad/index.html
+++ b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/microsoft/ad/index.html
@@ -95,6 +95,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="../../index_filter.html">Index of all Filter Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../index_inventory.html">Index of all Inventory Plugins</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../index_lookup.html">Index of all Lookup Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../index_module.html">Index of all Modules</a></li>
 </ul>
 <p class="caption" role="heading"><span class="caption-text">Reference indexes:</span></p>
@@ -223,6 +224,14 @@
 </ul>
 <div class="toctree-wrapper compound">
 </div>
+</section>
+<section id="lookup-plugins">
+<h3>Lookup Plugins<a class="headerlink" href="#lookup-plugins" title="Link to this heading"></a></h3>
+<ul class="simple">
+<li><p><a class="reference internal" href="laps_lookup.html#ansible-collections-microsoft-ad-laps-lookup"><span class="std std-ref">laps lookup</span></a> – Inventory plugin for Active Directory</p></li>
+</ul>
+<div class="toctree-wrapper compound">
+</div>
 <div class="admonition seealso">
 <p class="admonition-title">See also</p>
 <p>List of <a class="reference internal" href="../../index.html#list-of-collections"><span class="std std-ref">collections</span></a> with docs hosted here.</p>
diff --git a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/microsoft/ad/ldap_inventory.html b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/microsoft/ad/ldap_inventory.html
index 8709209..cc75beb 100644
--- a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/microsoft/ad/ldap_inventory.html
+++ b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/microsoft/ad/ldap_inventory.html
@@ -24,7 +24,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="Index of all Filter Plugins" href="../../index_filter.html" />
+    <link rel="next" title="microsoft.ad.laps lookup – Inventory plugin for Active Directory" href="laps_lookup.html" />
     <link rel="prev" title="microsoft.ad.parse_dn filter – Parses an LDAP DistinguishedName string into an object." href="parse_dn_filter.html" /><!-- extra head elements for Ansible beyond RTD Sphinx Theme -->
 
 
@@ -95,6 +95,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="../../index_filter.html">Index of all Filter Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../index_inventory.html">Index of all Inventory Plugins</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../index_lookup.html">Index of all Lookup Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../index_module.html">Index of all Modules</a></li>
 </ul>
 <p class="caption" role="heading"><span class="caption-text">Reference indexes:</span></p>
@@ -751,7 +752,7 @@ see <a class="reference internal" href="#ansible-collections-microsoft-ad-ldap-i
 
 <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
         <a href="parse_dn_filter.html" class="btn btn-neutral float-left" title="microsoft.ad.parse_dn filter – Parses an LDAP DistinguishedName string into an object." accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
-        <a href="../../index_filter.html" class="btn btn-neutral float-right" title="Index of all Filter Plugins" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
+        <a href="laps_lookup.html" class="btn btn-neutral float-right" title="microsoft.ad.laps lookup – Inventory plugin for Active Directory" 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.ad/microsoft.ad/docsbuild/base/collections/microsoft/ad/membership_module.html b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/microsoft/ad/membership_module.html
index 64962be..046d725 100644
--- a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/microsoft/ad/membership_module.html
+++ b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/microsoft/ad/membership_module.html
@@ -95,6 +95,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="../../index_filter.html">Index of all Filter Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../index_inventory.html">Index of all Inventory Plugins</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../index_lookup.html">Index of all Lookup Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../index_module.html">Index of all Modules</a></li>
 </ul>
 <p class="caption" role="heading"><span class="caption-text">Reference indexes:</span></p>
diff --git a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/microsoft/ad/object_info_module.html b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/microsoft/ad/object_info_module.html
index 25a7a73..786db89 100644
--- a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/microsoft/ad/object_info_module.html
+++ b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/microsoft/ad/object_info_module.html
@@ -95,6 +95,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="../../index_filter.html">Index of all Filter Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../index_inventory.html">Index of all Inventory Plugins</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../index_lookup.html">Index of all Lookup Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../index_module.html">Index of all Modules</a></li>
 </ul>
 <p class="caption" role="heading"><span class="caption-text">Reference indexes:</span></p>
diff --git a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/microsoft/ad/object_module.html b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/microsoft/ad/object_module.html
index fb64318..57a541a 100644
--- a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/microsoft/ad/object_module.html
+++ b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/microsoft/ad/object_module.html
@@ -95,6 +95,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="../../index_filter.html">Index of all Filter Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../index_inventory.html">Index of all Inventory Plugins</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../index_lookup.html">Index of all Lookup Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../index_module.html">Index of all Modules</a></li>
 </ul>
 <p class="caption" role="heading"><span class="caption-text">Reference indexes:</span></p>
diff --git a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/microsoft/ad/offline_join_module.html b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/microsoft/ad/offline_join_module.html
index 713d7a8..df21937 100644
--- a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/microsoft/ad/offline_join_module.html
+++ b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/microsoft/ad/offline_join_module.html
@@ -95,6 +95,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="../../index_filter.html">Index of all Filter Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../index_inventory.html">Index of all Inventory Plugins</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../index_lookup.html">Index of all Lookup Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../index_module.html">Index of all Modules</a></li>
 </ul>
 <p class="caption" role="heading"><span class="caption-text">Reference indexes:</span></p>
diff --git a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/microsoft/ad/ou_module.html b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/microsoft/ad/ou_module.html
index dd2ad48..56d0bff 100644
--- a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/microsoft/ad/ou_module.html
+++ b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/microsoft/ad/ou_module.html
@@ -95,6 +95,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="../../index_filter.html">Index of all Filter Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../index_inventory.html">Index of all Inventory Plugins</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../index_lookup.html">Index of all Lookup Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../index_module.html">Index of all Modules</a></li>
 </ul>
 <p class="caption" role="heading"><span class="caption-text">Reference indexes:</span></p>
diff --git a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/microsoft/ad/parse_dn_filter.html b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/microsoft/ad/parse_dn_filter.html
index 766f688..9ab4d4e 100644
--- a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/microsoft/ad/parse_dn_filter.html
+++ b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/microsoft/ad/parse_dn_filter.html
@@ -95,6 +95,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="../../index_filter.html">Index of all Filter Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../index_inventory.html">Index of all Inventory Plugins</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../index_lookup.html">Index of all Lookup Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../index_module.html">Index of all Modules</a></li>
 </ul>
 <p class="caption" role="heading"><span class="caption-text">Reference indexes:</span></p>
diff --git a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/microsoft/ad/user_module.html b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/microsoft/ad/user_module.html
index 60c1f90..85c6333 100644
--- a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/microsoft/ad/user_module.html
+++ b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/microsoft/ad/user_module.html
@@ -95,6 +95,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="../../index_filter.html">Index of all Filter Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../index_inventory.html">Index of all Inventory Plugins</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../../index_lookup.html">Index of all Lookup Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../../index_module.html">Index of all Modules</a></li>
 </ul>
 <p class="caption" role="heading"><span class="caption-text">Reference indexes:</span></p>
diff --git a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/microsoft/index.html b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/microsoft/index.html
index 9cd4ebc..ecc70b9 100644
--- a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/collections/microsoft/index.html
+++ b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/collections/microsoft/index.html
@@ -89,6 +89,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="../index_filter.html">Index of all Filter Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../index_inventory.html">Index of all Inventory Plugins</a></li>
+<li class="toctree-l1"><a class="reference internal" href="../index_lookup.html">Index of all Lookup Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="../index_module.html">Index of all Modules</a></li>
 </ul>
 <p class="caption" role="heading"><span class="caption-text">Reference indexes:</span></p>
diff --git a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/index.html b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/index.html
index bd13e43..241ba57 100644
--- a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/index.html
+++ b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/index.html
@@ -81,6 +81,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="collections/index_filter.html">Index of all Filter Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="collections/index_inventory.html">Index of all Inventory Plugins</a></li>
+<li class="toctree-l1"><a class="reference internal" href="collections/index_lookup.html">Index of all Lookup Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="collections/index_module.html">Index of all Modules</a></li>
 </ul>
 <p class="caption" role="heading"><span class="caption-text">Reference indexes:</span></p>
@@ -128,6 +129,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="collections/index_filter.html">Index of all Filter Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="collections/index_inventory.html">Index of all Inventory Plugins</a></li>
+<li class="toctree-l1"><a class="reference internal" href="collections/index_lookup.html">Index of all Lookup Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="collections/index_module.html">Index of all Modules</a></li>
 </ul>
 </div>
diff --git a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/search.html b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/search.html
index e8e80f0..665694e 100644
--- a/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/base/search.html
+++ b/home/runner/work/microsoft.ad/microsoft.ad/docsbuild/head/search.html
@@ -82,6 +82,7 @@
 <ul>
 <li class="toctree-l1"><a class="reference internal" href="collections/index_filter.html">Index of all Filter Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="collections/index_inventory.html">Index of all Inventory Plugins</a></li>
+<li class="toctree-l1"><a class="reference internal" href="collections/index_lookup.html">Index of all Lookup Plugins</a></li>
 <li class="toctree-l1"><a class="reference internal" href="collections/index_module.html">Index of all Modules</a></li>
 </ul>
 <p class="caption" role="heading"><span class="caption-text">Reference indexes:</span></p>

Copy link

@no-12 no-12 force-pushed the main branch 3 times, most recently from 4c5f745 to 923a2e7 Compare March 1, 2024 23:49
Copy link

@jborean93
Copy link
Collaborator

I was originally going to create this lookup plugin but decided not to in favour of the inventory plugin. The primary reason behind this is due to how templates works in Ansible. When you set the variable ansible_password: '{{ lookup("microsoft.ad.laps", ...) }}' in your inventory/group_vars then the literal value will be the template string. Only when that variable is used will the lookup be run which means that each task in your playbook will require this LDAP query to run slowing down your tasks. It's even worse when you are using the encrypted LAPS password because not only does it need to open a connection to the LDAP server to get the raw value it also then needs to open an RPC connection to decrypt the value. This is also done per user even if they are targeting the same domain environment as the lookup is run per var and there is no shared LDAP connection it can utilise together. So altogether using a lookup template as the value for ansible_password means you have not only the extra connection plugin connection but potentially 1-2 connections for LAPS plus the network hops needed for the authentication attempt per task per user.

The LDAP inventory plugin avoids all this because it can retrieve the data for all hosts in one invocation, cache the actual value in the var so it doesn't need to run a task. I would be more keen on potentially documenting this a bit better an potentially showing how it is possible to replicate how to use LAPS password with the LDAP inventory plugin.

I am happy to be convinced otherwise but the above is what made me hold off from creating an explicit LAPS lookup to replace the one in community.windows.

@no-12
Copy link
Author

no-12 commented Mar 4, 2024

As far as I know, if you use a lookup plugin inside the set_facts module, then it will only run once. per playbook.

There are some issues with the inventory approach:

  • When there is a huge inventory and you only want to target a very small sub-set with dynamic "hosts" field or limit. In this scenario there is a huge overhead of fetching all LAPS credentials.
  • Inventories in AWX are strictly separated from the playbook. You can use constructed Inventories like the microsoft.ad.ldap plugin.
    But this will store all LAPS credentials in clear text in the AWX DB Encrypt LAPS credentials with ansible-vault #100 and reevaluate the constructed inventory on every playbook run can take several minutes on huge inventories.

So I think adding a second possiblity to this collection gives the user the chance to choose the "right" approach for his problem.

@jborean93 Thanks to your work regarding the LDAP communication and especially the rpc to decrypt the LAPS password, it is quite easy to add this lookup plugin the collection. The ldap plugin utils are marked as "internal" so it would be ver hard to maintain the lookup plugin outside of this collection.

@jborean93
Copy link
Collaborator

As far as I know, if you use a lookup plugin inside the set_facts module, then it will only run once. per playbook.

That is the exception to the rule yes as the templating actually happens during the set_fact run and it will set the templated result as the variable. Unfortunately this means to use the lookup properly means having your playbook with this explicit step resulting in some hard ties between the inventory and your play which is never nice. Plus now people need to know how to "safely" use the lookup which isn't very good UX and by far I would say they would expect that setting it in the inventory/host vars wouldn't result in the issue it does today.

When there is a huge inventory and you only want to target a very small sub-set with dynamic "hosts" field or limit. In this scenario there is a huge overhead of fetching all LAPS credentials.

That's what the search_base and filteroptions are for. You can use it to restrict to a specific OU/container or filter the objects further by name/some other attribute. This can result in the same type of query the lookup would do but more efficient as you send it only once.

Inventories in AWX are strictly separated from the playbook

I will concede I don't know too much about how AWX works but inventories being separated from the playbook sounds like the right thing to do. Your playbooks should really be host agnostic (outside of it being Windows vs something else). All connection vars should be sourced from the inventory IMO.

@no-12
Copy link
Author

no-12 commented Mar 4, 2024

Unfortunately this means to use the lookup properly means having your playbook with this explicit step resulting in some hard ties between the inventory and your play which is never nice.

I do not understand why using a lookup plugin in a set_facts module would tie the inventory to the play. I think it's the opposite.
In my perspective the inventory and the ansible user/password are two completely separate things.
And yes the ldap inventory plugin ties this two things nicely together because it useses LDAP to get both them from the same source.
But you can have two different sources to these two things. For example a static inventory file and LDAP for the LAPS credentials.

Inventories in AWX are strictly separated from the playbook

With this i mean the inventory sync and the playbook run are separated. You can force them to run one after another, but this will result in a increased job run time if the inventory is not cached. And with the LAPS password changing quite often it is hard to refresh the cache in a timely manner.

All connection vars should be sourced from the inventory IMO.

This is a good point, but the thing with AWX is that it stores the host vars of each hosts it's DB. This is why I initially opened #100

The inventory and hosts data stored in the AWX DB are very useful for everyone to read except the ansible credential. We have 10k+ hosts in our AWX DB using a constructed inventory with filters would give us no ongoing Job history pf each host because on every new job with a different filter the constructed inventory would have other hosts.

The other problem with constructed inventories and so many hosts in AWX is performance. Storing so many hosts takes quite some time.

name: laps
author: Nico Ohnezat (@no-12)
short_description: Inventory plugin for Active Directory
version_added: 2.2.0
Copy link
Collaborator

Choose a reason for hiding this comment

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

The next version is going to be 1.5.0.

Suggested change
version_added: 2.2.0
version_added: 1.5.0

options:
_terms:
description:
- One or multiple C(CommonName) of the computer objects to search for.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think using the sAMAccountName might make more sense for computer accounts. Most people will know it by that value rather than the LDAP cn. We would have to ensure we add the $ suffix in the code if the user didn't supply it though.

default: subtree
type: str
notes:
- This plugin is a tech preview and the module options are subject to change
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should add a note that states some of the efficiency issues I've mentioned in the PR like

  • The lookup is run per task unless they define it through set_fact
  • Each lookup makes its own connection rather than sharing them
  • It is recommended to use the microsoft.ad.ldap plugin instead of this lookup.

Happy for you to put it in your own words.

For the last point you can add a plugin reference with P(...) like.

- Some message P(microsoft.ad.ldap#lookup)

notes:
- This plugin is a tech preview and the module options are subject to change
based on feedback received.
extends_documentation_fragment:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would be great to link it to the ldap inventory plugin.

Suggested change
extends_documentation_fragment:
seealso:
- plugin: microsoft.ad.ldap
plugin_type: inventory
description: You can use the microsoft.ad.ldap inventory plugin to more efficiently get the LAPS password for multiple computer accounts.
extends_documentation_fragment:

description:
- The LAPS password type to retrieve.
- Defaults to the C(auto).
- This will attempt to retrieve the LAPS password in the following order C(windows_encrypted), C(windows_plain_text), C(legacy_microsoft).
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should add a point saying the dpapi-ng Python library is required to decrypt the encrypted LAPS passwords.

@jborean93
Copy link
Collaborator

I suppose in the end it does hurt to have this functionality I just think we should try and point people towards the more efficient solution which is the inventory plugin. I've added a few comments in the review, please let me know what you think.

I do not understand why using a lookup plugin in a set_facts module would tie the inventory to the play.

My main point here is that your play now needs to have something like the below at the start of the playbook.

- hosts: windows
  gather_facts: false
  tasks:
  - set_fact:
      ansible_password: '{{ lookup("microsoft.ad.laps", ...) }}'

This now means the play is essentially set to only work with hosts that use LAPS or to use the hosts in question you have to use this playbook. Connection vars should IMO always be independent from a play itself and unfortunately that means with this lookup it will run on every task.

@jborean93
Copy link
Collaborator

@no-12 are you still interested in pursuing this? I'm hoping to push out a new release soon and was checking to see if I should wait or just keep this for the release after.

@no-12
Copy link
Author

no-12 commented Mar 14, 2024

Yes I'm interested in getting this merged, but I'm not sure if I can get this in a "mergable" state in the next few days. So please do not wait for this pull request to get ready.

I wanted to work through your comments and add at least some rudimentary unit tests.

And I was also thinking about adding integration tests, but I'm not sure if this is doable or desirable. I have to look into the existing implementation of the ldap inventory plugin integration tests, but right now I don't fully understand the setup.

@jborean93
Copy link
Collaborator

No worries, please let me know if you need help with the testing side, it is quite complex unfortunately but there is not too much we can do about that.

If the Windows images aren't new enough to test with you could potentially extend the schema manually and just set the values as a test. The encrypted ones will be harder to pull off but technically doable. If all else fails we could look at what the membership tests do in that it doesn't run in CI but provides a Vagrant setup that can allow us to run a test suite locally.

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