# How to skip pwsh component from sanity test

**URL:** <https://forum.ansible.com/t/how-to-skip-pwsh-component-from-sanity-test/45391>\
**Category:** Get Help\
**Created:** [February 24, 2026, 7:13am UTC](https://forum.ansible.com/t/how-to-skip-pwsh-component-from-sanity-test/45391 "2026-02-24T07:13:12Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![prabhuk](https://avatars.discourse-cdn.com/v4/letter/p/cdc98d/32.png) [@prabhuk](https://forum.ansible.com/u/prabhuk)\
**Post date:** [February 24, 2026, 7:13am UTC](https://forum.ansible.com/t/how-to-skip-pwsh-component-from-sanity-test/45391/1 "2026-02-24T07:13:12Z")

</div>

Hello Community!  
I need some help to skip/exclude the ‘pwsh’ component from integration tests.  
I was building [ansible](https://github.com/ansible/ansible) package and executing Unit, Sanity and Integration tests on ppc64le arch, but in Integration tests few tests requires pwsh (powershell) components, but it was not supported on ppc64le, so wont’ be able to install.  
I tried to skip that component by using flag **ANSIBLE\_SKIP\_PWSH\_MODULES=1** but didn’t work. Also didn’t found anything related to skip that properly.  
Could you please help me what to do in this situation?  
Below are the error logs for your reference:

```auto
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 23.2.1
    Not uninstalling pip at /usr/lib/python3.12/site-packages, outside environment /tmp/tmp.tgg653nqP2/ansible_collections/ns/col/sts/output/.tmp/delegation/python3.12-ssp
    Can't uninstall 'pip'. No files were found to uninstall.
Successfully installed pip-25.2
Running sanity test "action-plugin-docs"
Running sanity test "ansible-doc"
Running sanity test "changelog"
Running sanity test "compile" on Python 3.12
Running sanity test "empty-init"
Running sanity test "ignores"
Running sanity test "import" on Python 3.12
Running sanity test "line-endings"
Running sanity test "no-assert"
Running sanity test "no-get-exception"
Running sanity test "no-illegal-filenames"
Running sanity test "no-smart-quotes"
Running sanity test "pep8"
Running sanity test "pslint"
WARNING: Required program "pwsh" not found.
Running sanity test "pylint"
Running sanity test "replace-urlopen"
Running sanity test "runtime-metadata"
Running sanity test "shebang"
Running sanity test "shellcheck"
Running sanity test "symlinks"
Running sanity test "use-argspec-type-path"
Running sanity test "use-compat-six"
Running sanity test "validate-modules"
FATAL: Command "/root/.ansible/test/venv/sanity.validate-modules/3.12/8088ee77/bin/python /root/a/ansible/test/lib/ansible_test/_ul/controller/sanity/validate-modules/validate.py --format json --arg-spec --collection ansible_collections/ns/col --collection-veron 1.0.0 plugins/modules/hello.py plugins/modules/win_util_args.ps1 plugins/modules/win_util_args.py" returned exit status 1.
>>> Standard Error
Traceback (most recent call last):
  File "/root/a/ansible/test/lib/ansible_test/_util/controller/sanity/validate-modules/validate.py", line 6, in <module>
    main()
  File "/root/a/ansible/test/lib/ansible_test/_util/controller/sanity/validate-modules/validate_modules/main.py", line 2692, in ma
    run()
  File "/root/a/ansible/test/lib/ansible_test/_util/controller/sanity/validate-modules/validate_modules/main.py", line 2652, in ru
    mv1.validate()
  File "/root/a/ansible/test/lib/ansible_test/_util/controller/sanity/validate-modules/validate_modules/main.py", line 2458, in vadate
    self._validate_ansible_module_call(docs)
  File "/root/a/ansible/test/lib/ansible_test/_util/controller/sanity/validate-modules/validate_modules/main.py", line 1372, in _vidate_ansible_module_call
    spec, kwargs = get_ps_argument_spec(self.path, self.collection)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/a/ansible/test/lib/ansible_test/_util/controller/sanity/validate-modules/validate_modules/module_args.py", line 104,n get_ps_argument_spec
    raise FileNotFoundError('Required program for PowerShell arg spec inspection "pwsh" not found.')
FileNotFoundError: Required program for PowerShell arg spec inspection "pwsh" not found.
FATAL: Command "/usr/bin/env ANSIBLE_TEST_CONTENT_ROOT=/tmp/tmp.tgg653nqP2/ansible_collections/ns/col PYTHONPATH=/tmp/ansible-testx7o81gn /tmp/tmp.tgg653nqP2/ansible_collections/ns/col/tests/output/.tmp/delegation/python3.12-ssp/bin/python /root/a/ansible/bin/sible-test sanity --containers '{}' --truncate 0 --color yes --host-path tests/output/.tmp/host-r3q2lej6 --metadata tests/output/.p/metadata-opcyba7g.json" returned exit status 1.
+ rm -rf /tmp/tmp.tgg653nqP2
NOTICE: To resume at this test target, use the option: --start-at ansible-test-docker
NOTICE: To resume after this test target, use the option: --start-at ansible-test-git
FATAL: Command "./runme.sh" returned exit status 1.
mv: cannot stat '.ps1_backup_temp/*.ps1': No such file or directory
Restored 1 .ps1 modules

```

---

<div class="post-metadata">

**Author:** ![gundalow](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/gundalow/32/99_2.png) [@gundalow](https://forum.ansible.com/u/gundalow)\
**Post date:** [February 24, 2026, 10:31am UTC](https://forum.ansible.com/t/how-to-skip-pwsh-component-from-sanity-test/45391/2 "2026-02-24T10:31:36Z")

</div>

@mattclay Do you know why `ANSIBLE_SKIP_PWSH_MODULES` isn’t working as expected, @prabhuk is trying to skip this as it’s not available on ppc64le

---

<div class="post-metadata">

**Author:** ![jborean](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jborean/32/1525_2.png) [@jborean](https://forum.ansible.com/u/jborean)\
**Post date:** [February 24, 2026, 12:39pm UTC](https://forum.ansible.com/t/how-to-skip-pwsh-component-from-sanity-test/45391/3 "2026-02-24T12:39:57Z")

</div>

> Do you know why `ANSIBLE_SKIP_PWSH_MODULES` isn’t working as expected

I’ve not heard or seen any reference to this environment variable or any like that. Is it documented anywhere?

---

<div class="post-metadata">

**Author:** ![prabhuk](https://avatars.discourse-cdn.com/v4/letter/p/cdc98d/32.png) [@prabhuk](https://forum.ansible.com/u/prabhuk)\
**Post date:** [February 24, 2026, 2:37pm UTC](https://forum.ansible.com/t/how-to-skip-pwsh-component-from-sanity-test/45391/4 "2026-02-24T14:37:10Z")

</div>

No, it was not documented anywhere, I have used it while executing build script and tried to skip, but still **pwsh** components were executing.  
Could you please provide more info how pwsh component invoke and how we can exclude?

---

<div class="post-metadata">

**Author:** ![gundalow](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/gundalow/32/99_2.png) [@gundalow](https://forum.ansible.com/u/gundalow)\
**Post date:** [February 24, 2026, 3:57pm UTC](https://forum.ansible.com/t/how-to-skip-pwsh-component-from-sanity-test/45391/5 "2026-02-24T15:57:26Z")

</div>

@prabhuk I don’t see any reference to `SKIP_PWSH_MODULES` in the Ansible codebase, though maybe I’m looking in the wrong place.  
Where did you find reference to it?

---

<div class="post-metadata">

**Author:** ![prabhuk](https://avatars.discourse-cdn.com/v4/letter/p/cdc98d/32.png) [@prabhuk](https://forum.ansible.com/u/prabhuk)\
**Post date:** [February 24, 2026, 5:01pm UTC](https://forum.ansible.com/t/how-to-skip-pwsh-component-from-sanity-test/45391/6 "2026-02-24T17:01:32Z")

</div>

Yeah, as I mentioned earlier I was executing integration test and it was calling inside it, mentioned few reference which i found, it might not be exact ones, since I can see pwsh is calling from many places,

> <https://github.com/ansible/ansible/blob/a751010beaeeeeda97fd688e609f6035e9698ad2/test/lib/ansible_test/_util/controller/sanity/validate-modules/validate_modules/module_args.py#L102>

[ansible/test/integration/targets/ansible-test-sanity-validate-modules/runme.sh at a751010beaeeeeda97fd688e609f6035e9698ad2 · ansible/ansible](https://github.com/ansible/ansible/blob/a751010beaeeeeda97fd688e609f6035e9698ad2/test/integration/targets/ansible-test-sanity-validate-modules/runme.sh)

---

<div class="post-metadata">

**Author:** ![Akasurde](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/akasurde/32/230_2.png) [@Akasurde](https://forum.ansible.com/u/Akasurde)\
**Post date:** [February 24, 2026, 5:10pm UTC](https://forum.ansible.com/t/how-to-skip-pwsh-component-from-sanity-test/45391/7 "2026-02-24T17:10:01Z")

</div>

What is the command you are trying? Is there any PowerShell modules in your source directory?

---

<div class="post-metadata">

**Author:** ![mattclay](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/mattclay/32/268_2.png) [@mattclay](https://forum.ansible.com/u/mattclay)\
**Post date:** [February 24, 2026, 5:54pm UTC](https://forum.ansible.com/t/how-to-skip-pwsh-component-from-sanity-test/45391/8 "2026-02-24T17:54:07Z")

</div>

There is no `ANSIBLE_SKIP_PWSH_MODULES` environment variable or setting.

Not all integration tests will work on ppc64le. For those cases, you’ll need to skip those tests. Tests that rely on PowerShell are one example of this, but there are others.

---

<div class="post-metadata">

**Author:** ![prabhuk](https://avatars.discourse-cdn.com/v4/letter/p/cdc98d/32.png) [@prabhuk](https://forum.ansible.com/u/prabhuk)\
**Post date:** [February 25, 2026, 12:15am UTC](https://forum.ansible.com/t/how-to-skip-pwsh-component-from-sanity-test/45391/9 "2026-02-25T00:15:51Z")

</div>

Yeah, there are many PowerShell dependent modules in [ansible](https://github.com/ansible/ansible), currently getting an error from - **plugins/modules/win\_util\_args.ps1**  
I was executing an Integration test with command “./bin/ansible-test integration --python 3.12” which internally triggers sanity test “ **ansible-test sanity --test validate-modules** ”

---

<div class="post-metadata">

**Author:** ![prabhuk](https://avatars.discourse-cdn.com/v4/letter/p/cdc98d/32.png) [@prabhuk](https://forum.ansible.com/u/prabhuk)\
**Post date:** [February 25, 2026, 12:22am UTC](https://forum.ansible.com/t/how-to-skip-pwsh-component-from-sanity-test/45391/10 "2026-02-25T00:22:54Z")

</div>

oh, ok, Can I know how if there are any other way apart from **–exclude** to skip those tests?  
And by any chance list of tests which are not supported on ppc64le, it saves me a lot of time.

---

<div class="post-metadata">

**Author:** ![mattclay](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/mattclay/32/268_2.png) [@mattclay](https://forum.ansible.com/u/mattclay)\
**Post date:** [February 25, 2026, 12:49am UTC](https://forum.ansible.com/t/how-to-skip-pwsh-component-from-sanity-test/45391/11 "2026-02-25T00:49:59Z")

</div>

Using `--exclude` is the correct way to skip integration tests that would otherwise match the test criteria you specified. Keep in mind the argument is a regular expression, so you can specify multiple test targets at once, such as `--exclude 'some_test|another_test'`

We do not maintain a list of tests which are unsupported on specific architectures, since doing so is impractical.

---

<div class="post-metadata">

**Author:** ![Akasurde](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/akasurde/32/230_2.png) [@Akasurde](https://forum.ansible.com/u/Akasurde)\
**Post date:** [February 25, 2026, 12:53am UTC](https://forum.ansible.com/t/how-to-skip-pwsh-component-from-sanity-test/45391/12 "2026-02-25T00:53:36Z")

</div>

We don’t have ppc64le hardware, so we can’t tell you right away which tests would fail.

You can use aliases to disable test which does not work for ppc64le hardware. Please refer [integration-aliases — Ansible Community Documentation](https://docs.ansible.com/projects/ansible/latest/dev_guide/testing/sanity/integration-aliases.html#disabled) for more details.

Thanks,

---

<div class="post-metadata">

**Author:** ![prabhuk](https://avatars.discourse-cdn.com/v4/letter/p/cdc98d/32.png) [@prabhuk](https://forum.ansible.com/u/prabhuk)\
**Post date:** [March 16, 2026, 11:22am UTC](https://forum.ansible.com/t/how-to-skip-pwsh-component-from-sanity-test/45391/13 "2026-03-16T11:22:26Z")

</div>

Hello Team,

I have completed the integration tests after excluding the cases that fail on **ppc64le** due to unsupported dependencies. The following 13 test cases are currently being excluded because they are failing:

1. `--exclude ansible-test-cloud-galaxy`
2. `--exclude ansible-galaxy-collection`
3. `--exclude ansible-test-coverage`
4. `--exclude ansible-test-docker`
5. `--exclude connection_ssh`
6. `--exclude fetch`
7. `--exclude file`
8. `--exclude keyword_inheritance`
9. `--exclude lookup_password`
10. `--exclude omit`
11. `--exclude async`
12. `--exclude callback_default`
13. `--exclude remote_tmp`

Could you please confirm if it is fine to exclude this many test cases for **ppc64le** while verifying the integration tests?

---

<div class="post-metadata">

**Author:** ![Akasurde](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/akasurde/32/230_2.png) [@Akasurde](https://forum.ansible.com/u/Akasurde)\
**Post date:** [March 16, 2026, 11:41am UTC](https://forum.ansible.com/t/how-to-skip-pwsh-component-from-sanity-test/45391/14 "2026-03-16T11:41:03Z")

</div>

Could you please create a separate repo for logs for each failure so that we can take a look and let you know? Thanks,

---

<div class="post-metadata">

**Author:** ![prabhuk](https://avatars.discourse-cdn.com/v4/letter/p/cdc98d/32.png) [@prabhuk](https://forum.ansible.com/u/prabhuk)\
**Post date:** [March 19, 2026, 12:43pm UTC](https://forum.ansible.com/t/how-to-skip-pwsh-component-from-sanity-test/45391/15 "2026-03-19T12:43:59Z")

</div>

Hey @Akasurde, sorry for delayed response, I had created seperate topic to discuss on failure with logs, please review - [Excluded failed Integration test cases on ppc64le](https://forum.ansible.com/t/excluded-failed-integration-test-cases-on-ppc64le/45563)
