# How to use the a10.acos\_axapi.a10\_file\_aflex module in Ansible

**URL:** <https://community.a10networks.com/t/how-to-use-the-a10-acos-axapi-a10-file-aflex-module-in-ansible/659>\
**Category:** aFleX\
**Tags:** aflex, devops, ansible\
**Created:** [June 14, 2021, 12:33pm UTC](https://community.a10networks.com/t/how-to-use-the-a10-acos-axapi-a10-file-aflex-module-in-ansible/659 "2021-06-14T12:33:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![AC2000](https://avatars.discourse-cdn.com/v4/letter/a/bc79bd/32.png) [@AC2000](https://community.a10networks.com/u/AC2000)\
**Post date:** [June 14, 2021, 12:33pm UTC](https://community.a10networks.com/t/how-to-use-the-a10-acos-axapi-a10-file-aflex-module-in-ansible/659/1 "2021-06-14T12:33:16Z")

</div>

Hello,  
I am trying to deploy aflex scripts to an a10 load balancer in Ansible with the a10\_file\_aflex&nbsp;python module in the a10.acos\_axapi Ansible collection. However, everytime I run my script, there are some weird errors that appear about the syntax of the structure of my ansible task and some mistakes of the aflex script. The documentation on how to structure the data (which fields must be defined) in order for the a10 load balancer to accept it is not clear. I would really appreciate if someone could guide on how to send these aflex scripts to the a10 with the a10\_file\_aflex&nbsp;ansible module. Thank you.

 ![a10_ansible_task.png](https://us1.discourse-cdn.com/flex002/uploads/a10_community/original/1X/506e91be1630df0d77e823c551564a0cdbdaf33f.png)

 ![a10_error.png](https://us1.discourse-cdn.com/flex002/uploads/a10_community/original/1X/df02ae785b37fd5b0df8a7232ebdb55ab940bf5c.png)

 ![a10_ansible_task_2.png](https://us1.discourse-cdn.com/flex002/uploads/a10_community/original/1X/3f05f91e33cce8769ef9ff3a506200cedcc62e8e.png)

 ![a10_error_2.png](https://us1.discourse-cdn.com/flex002/uploads/a10_community/original/1X/4e104072825ebc862673f5d1f6449c916f9af07b.png)
