# Use json and code  and a job template to create  template, survey and survey spec

**URL:** <https://forum.ansible.com/t/use-json-and-code-and-a-job-template-to-create-template-survey-and-survey-spec/36985>\
**Category:** AWX Project\
**Tags:** awx, kubernetes\
**Created:** [August 12, 2022, 8:51pm UTC](https://forum.ansible.com/t/use-json-and-code-and-a-job-template-to-create-template-survey-and-survey-spec/36985 "2022-08-12T20:51:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bill\_Biker](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/bill_biker/32/8087_2.png) [@Bill\_Biker](https://forum.ansible.com/u/Bill_Biker)\
**Post date:** [August 12, 2022, 8:51pm UTC](https://forum.ansible.com/t/use-json-and-code-and-a-job-template-to-create-template-survey-and-survey-spec/36985/1 "2022-08-12T20:51:52Z")

</div>

From this link: [https://github.com/network-automation/toolkit](https://github.com/network-automation/toolkit)  
There is an excellent method to create a survey and a survey spec that allows selecting a file as a choice in the survey. It is baseed lon a backup.j2 file which contains JSON and bracketed code.

I have triedc this using the api and AWX ver 17, and AWX-OPERATOR based on a single kubernetes pod.

I can create a job template via the API, but I cannot create a survey with a survey spec using the json code - this workd for Ansible controller, but so far no dice for AWX ver 17 or the kubernetes based version

I can look at the code on the github site, but it will not implement the code from a playbook. It looks like the playbook that creates the job template and the survey - cannot access the spi from within ansible

any ideas??

ewholz

---

<div class="post-metadata">

**Author:** ![AWX\_Project](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@AWX\_Project](https://forum.ansible.com/u/AWX_Project)\
**Post date:** [August 17, 2022, 2:48pm UTC](https://forum.ansible.com/t/use-json-and-code-and-a-job-template-to-create-template-survey-and-survey-spec/36985/2 "2022-08-17T14:48:57Z")

</div>

Hi,

Are you using a collection to achieve this? I’m not sure what your playbook looks like but it sounds like a config issue based on the behavior.  
AWX Team
