# 'script' module in ansible not supported in AWX?

**URL:** <https://forum.ansible.com/t/script-module-in-ansible-not-supported-in-awx/3239>\
**Category:** Get Help\
**Tags:** collections, awx, kubernetes\
**Created:** [January 10, 2024, 10:03am UTC](https://forum.ansible.com/t/script-module-in-ansible-not-supported-in-awx/3239 "2024-01-10T10:03:48Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![runningrice](https://avatars.discourse-cdn.com/v4/letter/r/a183cd/32.png) [@runningrice](https://forum.ansible.com/u/runningrice)\
**Post date:** [January 10, 2024, 10:03am UTC](https://forum.ansible.com/t/script-module-in-ansible-not-supported-in-awx/3239/1 "2024-01-10T10:03:48Z")

</div>

I’ve set up an AWX-23.5.1 by using awx-operator on my K8S cluster. When I tried to run command for my inventory from web I failed to find ‘script’ module, which is available in ansible that I’ve used some days before. (available modules includes: command, shell, apt, yum, etc. but no script)  
So I wonder is this because I missed some configuration to include ‘script’ module in my AWX? If so , is there any document for fix this? Or AWX did exclude ‘script’ module on purpose and why?

---

<div class="post-metadata">

**Author:** ![kurokobo](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/kurokobo/32/182_2.png) [@kurokobo](https://forum.ansible.com/u/kurokobo)\
**Post date:** [January 10, 2024, 2:27pm UTC](https://forum.ansible.com/t/script-module-in-ansible-not-supported-in-awx/3239/2 "2024-01-10T14:27:54Z")

</div>

Hi,

There is an option called **Ansible Modules Allowed for Ad Hoc Jobs** under `Settings` \> `Jobs` and you can add any modules to this list.

[https://ansible.readthedocs.io/projects/awx/en/latest/administration/configure\_awx.html#jobs](https://ansible.readthedocs.io/projects/awx/en/latest/administration/configure_awx.html#jobs)

However, `script` module in AWX will probably not work as expected. My understanding is that `script` is intentionally excluded by default. The problem is that it is difficult to place the script files to run.

The technical background is:

- Any ad hoc commands are executed in a pod called Automation Job Pod. This is an ephemeral pod that is created each time it is run and deleted upon completion.
- Script files to be executed by the `script` module must be present in this pod.
- To place files in this pod, you must either create your own EE image containing the files, or define an EE containing the custom pod spec and mount ConfigMap or PV that contains files. This is a bit of a complicated procedure and is not a solution that is readily available to everyone.

---

<div class="post-metadata">

**Author:** ![runningrice](https://avatars.discourse-cdn.com/v4/letter/r/a183cd/32.png) [@runningrice](https://forum.ansible.com/u/runningrice)\
**Post date:** [January 11, 2024, 1:07am UTC](https://forum.ansible.com/t/script-module-in-ansible-not-supported-in-awx/3239/3 "2024-01-11T01:07:28Z")

</div>

That’s a quick and clear answer and helps a lot. thx

---

<div class="post-metadata">

**Author:** ![Dustin](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/dustin/32/2573_2.png) [@Dustin](https://forum.ansible.com/u/Dustin)\
**Post date:** [January 11, 2024, 12:52pm UTC](https://forum.ansible.com/t/script-module-in-ansible-not-supported-in-awx/3239/4 "2024-01-11T12:52:16Z")

</div>

Could you include the script in your git source control? Then, when you create a job template and choose a project that uses the source control the file will also be loaded into the EE pod.

---

<div class="post-metadata">

**Author:** ![kurokobo](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/kurokobo/32/182_2.png) [@kurokobo](https://forum.ansible.com/u/kurokobo)\
**Post date:** [January 11, 2024, 1:14pm UTC](https://forum.ansible.com/t/script-module-in-ansible-not-supported-in-awx/3239/5 "2024-01-11T13:14:57Z")

</div>

> [@Dustin](#):
>
> Could you include the script in your git source control? Then, when you create a job template and choose a project that uses the source control the file will also be loaded into the EE pod.

This can be done for `script` module _in playbooks_ (job template), but OP wants to use `script` module as an ad-hoc command, so there is no chance to read files from SCM ☹

---

<div class="post-metadata">

**Author:** ![Dustin](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/dustin/32/2573_2.png) [@Dustin](https://forum.ansible.com/u/Dustin)\
**Post date:** [January 11, 2024, 1:35pm UTC](https://forum.ansible.com/t/script-module-in-ansible-not-supported-in-awx/3239/6 "2024-01-11T13:35:25Z")

</div>

I see. I misunderstood and though he was trying to use in playbook. Thanks for clarification.
