# Need help with task template Args and Survey sections

**URL:** <https://forum.ansible.com/t/need-help-with-task-template-args-and-survey-sections/8302>\
**Category:** Get Help\
**Tags:** semaphore\
**Created:** [September 6, 2024, 6:52pm UTC](https://forum.ansible.com/t/need-help-with-task-template-args-and-survey-sections/8302 "2024-09-06T18:52:30Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![jg1000c](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jg1000c/32/4660_2.png) [@jg1000c](https://forum.ansible.com/u/jg1000c)\
**Post date:** [September 6, 2024, 6:52pm UTC](https://forum.ansible.com/t/need-help-with-task-template-args-and-survey-sections/8302/1 "2024-09-06T18:52:30Z")

</div>

Hi,  
It looks like the documentation for Semaphore UI needs to be updated for the Args section when creating a new task tempate. I’m not clear on what a valid value should be. For example force\_reboot=yes, force\_reboot:yes, etc. Can someone help me out?

 ![Screenshot 2024-09-03 at 10.06.36 AM](https://us1.discourse-cdn.com/ansible/original/2X/0/09c0e60cf8532a63dbbe7a5b8f8e36e6d1976cfd.png)

---

<div class="post-metadata">

**Author:** ![utoddl](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/utoddl/32/249_2.png) [@utoddl](https://forum.ansible.com/u/utoddl)\
**Post date:** [September 6, 2024, 7:28pm UTC](https://forum.ansible.com/t/need-help-with-task-template-args-and-survey-sections/8302/2 "2024-09-06T19:28:40Z")

</div>

Looks like an interesting project. You might have more luck getting help for it at

> **[semaphoreui/semaphore · Discussions](https://github.com/semaphoreui/semaphore/discussions)**
>
> Explore the GitHub Discussions forum for semaphoreui semaphore. Discuss code, ask questions & collaborate with the developer community.

---

<div class="post-metadata">

**Author:** ![jg1000c](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jg1000c/32/4660_2.png) [@jg1000c](https://forum.ansible.com/u/jg1000c)\
**Post date:** [September 9, 2024, 1:41pm UTC](https://forum.ansible.com/t/need-help-with-task-template-args-and-survey-sections/8302/3 "2024-09-09T13:41:44Z")

</div>

I did post my question there and did not get any replys.

---

<div class="post-metadata">

**Author:** ![Denney-tech](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/denney-tech/32/1556_2.png) [@Denney-tech](https://forum.ansible.com/u/Denney-tech)\
**Post date:** [September 9, 2024, 2:26pm UTC](https://forum.ansible.com/t/need-help-with-task-template-args-and-survey-sections/8302/4 "2024-09-09T14:26:12Z")

</div>

Looking at their docs, it looks like it accepts an array of ansible cli arguments. So your example would need to be passed to the `-e` parameter explicitly.

Your args needs to start with `-e` and immediately be followed by all parameters you wish to pass to the arg (as a single additional arg). I would use json for this. `{"suppress_reboot": true}`. You could pass them ini style as well, but I prefer json whenever I need to pass boolean values.

The old style would look like `["-e", "{\"suppress_reboot\": true}"]`.

---

<div class="post-metadata">

**Author:** ![jg1000c](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jg1000c/32/4660_2.png) [@jg1000c](https://forum.ansible.com/u/jg1000c)\
**Post date:** [September 9, 2024, 2:46pm UTC](https://forum.ansible.com/t/need-help-with-task-template-args-and-survey-sections/8302/5 "2024-09-09T14:46:12Z")

</div>

There documentation is out of date. There is no longer a box to enter your json in. It has these plus signs and you add each argument individually. I’m just not clear on how they are parsed.

 ![Screenshot 2024-09-03 at 10.06.36 AM](https://us1.discourse-cdn.com/ansible/original/2X/0/09c0e60cf8532a63dbbe7a5b8f8e36e6d1976cfd.png)

---

<div class="post-metadata">

**Author:** ![Denney-tech](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/denney-tech/32/1556_2.png) [@Denney-tech](https://forum.ansible.com/u/Denney-tech)\
**Post date:** [September 9, 2024, 2:48pm UTC](https://forum.ansible.com/t/need-help-with-task-template-args-and-survey-sections/8302/6 "2024-09-09T14:48:24Z")

</div>

That’s what I’m suggesting. Clear what’s there. Click the plus sign to add `-e` as the first arg, and then click the plus sign to add the `{"suppress_reboot": true}` as the second arg.

The UI will pass the two args as an array to the cli, and would literally be `["-e", "{\"suppress_reboot\": true}"]`.

---

<div class="post-metadata">

**Author:** ![jg1000c](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jg1000c/32/4660_2.png) [@jg1000c](https://forum.ansible.com/u/jg1000c)\
**Post date:** [September 9, 2024, 3:35pm UTC](https://forum.ansible.com/t/need-help-with-task-template-args-and-survey-sections/8302/7 "2024-09-09T15:35:55Z")

</div>

Ah, gotcha, OK I’ll test that.

Thanks

---

<div class="post-metadata">

**Author:** ![jg1000c](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jg1000c/32/4660_2.png) [@jg1000c](https://forum.ansible.com/u/jg1000c)\
**Post date:** [September 16, 2024, 8:40pm UTC](https://forum.ansible.com/t/need-help-with-task-template-args-and-survey-sections/8302/9 "2024-09-16T20:40:06Z")

</div>

HI, it works with one extra args variable but if I add another like in the screenshot, it thinks the second argument is the playbook name. Any idea what I’m doing wrong?

 ![Screenshot 2024-09-16 at 4.37.42 PM](https://us1.discourse-cdn.com/ansible/original/2X/f/fa9ba17d5b2600251f331b9763f96582f643ad08.png)

---

<div class="post-metadata">

**Author:** ![jg1000c](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jg1000c/32/4660_2.png) [@jg1000c](https://forum.ansible.com/u/jg1000c)\
**Post date:** [September 16, 2024, 8:42pm UTC](https://forum.ansible.com/t/need-help-with-task-template-args-and-survey-sections/8302/10 "2024-09-16T20:42:24Z")

</div>

Hi, what would two variables after -e look like? space between them?

---

<div class="post-metadata">

**Author:** ![jg1000c](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jg1000c/32/4660_2.png) [@jg1000c](https://forum.ansible.com/u/jg1000c)\
**Post date:** [September 16, 2024, 8:45pm UTC](https://forum.ansible.com/t/need-help-with-task-template-args-and-survey-sections/8302/11 "2024-09-16T20:45:28Z")

</div>

I think I got it.

{“SERVERS\_TO\_TARGET”:“test” , “BATCH\_SIZE”:“1”}

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [October 16, 2024, 8:46pm UTC](https://forum.ansible.com/t/need-help-with-task-template-args-and-survey-sections/8302/12 "2024-10-16T20:46:11Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
