# A10 Networks modules - Request for Testing and feedback

**URL:** <https://forum.ansible.com/t/a10-networks-modules-request-for-testing-and-feedback/15382>\
**Category:** Ansible Project\
**Created:** [May 31, 2014, 5:36pm UTC](https://forum.ansible.com/t/a10-networks-modules-request-for-testing-and-feedback/15382 "2014-05-31T17:36:57Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mischa\_Peters](https://avatars.discourse-cdn.com/v4/letter/m/858c86/32.png) [@Mischa\_Peters](https://forum.ansible.com/u/Mischa_Peters)\
**Post date:** [May 31, 2014, 5:36pm UTC](https://forum.ansible.com/t/a10-networks-modules-request-for-testing-and-feedback/15382/1 "2014-05-31T17:36:57Z")

</div>

Hi All,

I have created 3 modules for managing A10 Networks devices, Thunder / vThunder / AX / SoftAX.  
You can find them in my fork: [https://github.com/mischapeters/ansible.git](https://github.com/mischapeters/ansible.git)

The current modules are:  
- a10\_server  
-- creating / removing a server  
-- creating / removing a server port  
-- disable / enable the server

- a10\_service\_group  
-- creating / removing a service-group  
-- setting the load balancing method  
-- adding members to the service-group  
-- disable / enable a member

- a10\_virtual  
-- creating / removing a virtual-server  
-- creating / removing virtual-server port  
-- adding a service-group  
-- disable / enable the virtual-server  
-- disable / enable the virtual-server port

Things that I would like to add in the near future:  
- creating a source-nat pool  
- adding a source-nat pool to the virtual-server port  
- adding SSL certificates  
- creating a Client-SSL template  
- adding the Client-SSL template to the virtual-server port  
- creating a health monitor  
- adding the health monitor to the server port or service-group

If there is anybody who has A10 Networks in their network please give it a go.  
It requires aXAPI 2.1, which got introduced in ACOS release 2.7.1. Which is now at 2.7.1-P5.

Thanx!

Mischa

PS: full disclosure, I work for A10 Networks in EMEA.

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [June 1, 2014, 7:10pm UTC](https://forum.ansible.com/t/a10-networks-modules-request-for-testing-and-feedback/15382/2 "2014-06-01T19:10:24Z")

</div>

Hi,

This is very nice to see, can you perhaps link to a pull request instead so folks can leave comments there?

This is usually an easier way to track review, and IIRC that’s already been submitted.

Examples for people with A10 hardware to try would also we useful, though these could be included in the EXAMPLES section of those modules, I’d think.

Thanks!

–Michael

---

<div class="post-metadata">

**Author:** ![Mischa\_Peters](https://avatars.discourse-cdn.com/v4/letter/m/858c86/32.png) [@Mischa\_Peters](https://forum.ansible.com/u/Mischa_Peters)\
**Post date:** [June 2, 2014, 6:18am UTC](https://forum.ansible.com/t/a10-networks-modules-request-for-testing-and-feedback/15382/3 "2014-06-02T06:18:10Z")

</div>

Hi Michael,

That makes sense. The pull request can be found at:  
[https://github.com/ansible/ansible/pull/7587](https://github.com/ansible/ansible/pull/7587)

The examples are indeed in the code already. But here theu are:

### Examples for a10\_server  
# Create a new server  
ansible host -m a10\_server -a "host=a10adc.example.com username=axapiuser password=axapipass server\_name=realserver1 server\_ip=192.168.1.23"

# Add a port  
ansible host -m a10\_server -a "host=a10adc.example.com username=axapiuser password=axapipass server\_name=realserver1 server\_port=80 server\_protocol=tcp"

# Disable a server  
ansible host -m a10\_server -a "host=a10adc.example.com username=axapiuser password=axapipass server\_name=realserver1 server\_status=disable"

### Examples for a10\_service\_group  
# Create a new service-group  
ansible host -m a10\_service\_group -a "host=a10adc.example.com username=axapiuser password=axapipass service\_group=sg-80-tcp"

# Add a server  
ansible host -m a10\_service\_group -a "host=a10adc.example.com username=axapiuser password=axapipass service\_group=sg-80-tcp server\_name=realserver1 server\_port=80"

# Disable a server  
ansible host -m a10\_service\_group -a "host=a10adc.example.com username=axapiuser password=axapipass service\_group=sg-80-tcp server\_name=realserver1 server\_port=80 status=disable"

### Examples for a10\_virtual  
# Create a new virtual server  
ansible host -m a10\_virtual -a "host=a10adc.example.com username=axapiuser password=axapipass virtual\_server=vip1 virtual\_server\_ip=192.168.1.20"

# Add a virtual port  
ansible host -m a10\_virtual -a "host=a10adc.example.com username=axapiuser password=axapipass virtual\_server=vip1 virtual\_server\_ip=192.168.1.20 virtual\_server\_port=80 virtual\_server\_port\_type=http service\_group=sg-80-tcp"

# Disable a virtual server  
ansible host -m a10\_virtual -a "host=a10adc.example.com username=axapiuser password=axapipass virtual\_server=vip1 status=disable"

# Disable a virtual server port  
ansible host -m a10\_virtual -a "host=a10adc.example.com username=axapiuser password=axapipass virtual\_server=vip1 virtual\_server\_port=80 virtual\_server\_port\_type=http virtual\_server\_port\_status=disable"

Mischa

---

<div class="post-metadata">

**Author:** ![David\_Carrasco](https://avatars.discourse-cdn.com/v4/letter/d/74df32/32.png) [@David\_Carrasco](https://forum.ansible.com/u/David_Carrasco)\
**Post date:** [April 22, 2019, 4:24pm UTC](https://forum.ansible.com/t/a10-networks-modules-request-for-testing-and-feedback/15382/4 "2019-04-22T16:24:09Z")

</div>

I am very new to both Ansible and A10, but it’s interesting to come across an article written 5 years ago of someone who already went down this road.  
I’m using the A10 in a network capacity (DDoS appliance) I was curious if there was any way to display or output “get\_facts” or show commands. At the moment I’m interesting in retrieving information, and everything I’ve been finding is ways to create/delete/modify configurations. And because I’m paranoid I’d like to know if there were safe “get\_facts” to perform.

David

---

<div class="post-metadata">

**Author:** ![Pshem\_Kowalczyk](https://avatars.discourse-cdn.com/v4/letter/p/e480ec/32.png) [@Pshem\_Kowalczyk](https://forum.ansible.com/u/Pshem_Kowalczyk)\
**Post date:** [April 22, 2019, 10:07pm UTC](https://forum.ansible.com/t/a10-networks-modules-request-for-testing-and-feedback/15382/5 "2019-04-22T22:07:25Z")

</div>

Hi,

We use the A10s. Those modules turned out to be not particularly useful for us, so we ended up using the API extensively to get information (both config and operational) from the devices.

kind regards  
Pshem

---

<div class="post-metadata">

**Author:** ![David\_Carrasco](https://avatars.discourse-cdn.com/v4/letter/d/74df32/32.png) [@David\_Carrasco](https://forum.ansible.com/u/David_Carrasco)\
**Post date:** [April 22, 2019, 11:05pm UTC](https://forum.ansible.com/t/a10-networks-modules-request-for-testing-and-feedback/15382/6 "2019-04-22T23:05:59Z")

</div>

Gotcha so does that mean you use Python scripts to leverage the A10 API, or do you somehow integrate Ansible with Python?

---

<div class="post-metadata">

**Author:** ![Pshem\_Kowalczyk](https://avatars.discourse-cdn.com/v4/letter/p/e480ec/32.png) [@Pshem\_Kowalczyk](https://forum.ansible.com/u/Pshem_Kowalczyk)\
**Post date:** [April 23, 2019, 1:37am UTC](https://forum.ansible.com/t/a10-networks-modules-request-for-testing-and-feedback/15382/7 "2019-04-23T01:37:49Z")

</div>

Hi,

For most of the stuff it’s just using the uri module, with something like this:

name: “execute command: {{ exec.meta.description }}”  
uri:  
method: “{{ exec.meta.method }}”  
url: “https://{{ a10\_device\_ip }}{{ exec.meta.uri }}”  
return\_content: true  
validate\_certs: no  
body\_format: “{{ exec.payload is defined | ternary(‘json’, omit) }}”  
body: “{{ exec.payload is defined | ternary(exec.payload, omit) }}”  
headers:  
Authorization: “A10 {{ signature }}”  
status\_code: “{{ exec.meta.status\_code| default(200) }}”  
timeout: 60  
register: exec\_result

which is executed from a loop, one call at a time.

kind regards  
Pshem

---

<div class="post-metadata">

**Author:** ![David\_Carrasco](https://avatars.discourse-cdn.com/v4/letter/d/74df32/32.png) [@David\_Carrasco](https://forum.ansible.com/u/David_Carrasco)\
**Post date:** [April 23, 2019, 1:58pm UTC](https://forum.ansible.com/t/a10-networks-modules-request-for-testing-and-feedback/15382/8 "2019-04-23T13:58:51Z")

</div>

Very cool. Thank you very much.
