mirror of https://github.com/ansible/ansible.git
ansible-test validate-modules - fix ps util checks (#84610)
* ansible-test validate-modules - fix ps util checks Fix the module util import checks done by `ansible-test sanity --test validate-modules` to support the newer `#AnsibleRequires` import statement and `-Optional` flag. * Fix sanity issuespull/84730/head
parent
d21788a9b4
commit
a742e20fca
@ -0,0 +1,3 @@
|
||||
bugfixes:
|
||||
- ansible-test - Fix support for detecting PowerShell modules importing module utils with the newer ``#AnsibleRequires`` format.
|
||||
- ansible-test - Fix support for PowerShell module_util imports with the ``-Optional`` flag.
|
||||
@ -0,0 +1,6 @@
|
||||
#!powershell
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
#AnsibleRequires -PowerShell Ansible.ModuleUtils.Legacy
|
||||
|
||||
'{"changed": false, "msg": "Hello, World!"}'
|
||||
@ -0,0 +1,17 @@
|
||||
# Copyright (c) 2025 Ansible Project
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
DOCUMENTATION:
|
||||
module: util_ansible_requires
|
||||
short_description: Short description for util_ansible_requires module
|
||||
description:
|
||||
- Description for util_ansible_requires module
|
||||
options: {}
|
||||
author:
|
||||
- Ansible Core Team
|
||||
|
||||
EXAMPLES: |
|
||||
- name: example for sidecar
|
||||
ns.col.util_ansible_requires:
|
||||
|
||||
RETURN: {}
|
||||
@ -0,0 +1,14 @@
|
||||
#!powershell
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
#AnsibleRequires -CSharpUtil Ansible.Basic
|
||||
#AnsibleRequires -PowerShell .foo -Optional
|
||||
|
||||
$module = [Ansible.Basic.AnsibleModule]::Create(
|
||||
$args,
|
||||
@{
|
||||
options = @{}
|
||||
}
|
||||
)
|
||||
|
||||
$module.ExitJson()
|
||||
@ -0,0 +1,17 @@
|
||||
# Copyright (c) 2025 Ansible Project
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
DOCUMENTATION:
|
||||
module: util_optional
|
||||
short_description: Short description for util_optional module
|
||||
description:
|
||||
- Description for util_optional module
|
||||
options: {}
|
||||
author:
|
||||
- Ansible Core Team
|
||||
|
||||
EXAMPLES: |
|
||||
- name: example for sidecar
|
||||
ns.col.util_optional:
|
||||
|
||||
RETURN: {}
|
||||
Loading…
Reference in New Issue