Thunder® ADCs (Application Delivery Controllers) are high-performance solutions to accelerate and optimize critical applications to ensure delivery and reliability.
A10 Ansible ACOS CLI modules is a custom plugin to do configurations on Thunder via CLI commands. It includes example playbooks to apply on hardware and virtual appliances.
We only support Ansible Suite version >=2.9
ACOS CLI Version | Ansible Version | Ansible Tower | Ansible Automation Platform | Ansible Netcomm |
---|---|---|---|---|
1.2.1 |
2.9.x , 2.13.x , 2.14.x , 2.15.x , 2.16.x |
17.1.x |
Not Support | >=2.0.0,<3.0.0 |
2.0.0 |
2.9.x , 2.13.x , 2.14.x , 2.15.x , 2.16.x |
17.1.x |
2.4.4 |
>=3.0.0,=<6.0.0 |
3.0.1 |
2.14.x , 2.15.x , 2.16.x , 2.17.x |
17.1.x |
2.4.4 |
>=6.1.0 |
- Install Ansible on your local OS.
- Search required Ansible configuration from examples.
- Execute Ansible playbooks to apply thunder configuration.
- Verify thunder configuration after ansible playbook is applied.
Please refer below sections for more details.
To install Ansible Suite on Ubuntu, Run the following command to download and install the latest version of Ansible:
apt install ansible
To install Ansible on MacOS, Run the following command to download and install the latest version of Ansible:
brew install ansible
a10-acos-cli is collection of custom ansible modules crated by a10Networks. It can be install using following ways, it is assumed that ansible suite is already installed and configured.
ansible-galaxy collection install a10.acos_cli-*
Be sure to note the collection path found within the output of the above command. For example:
$ ansible-galaxy collection install a10.acos_cli-*
Process install dependency map
Starting collection install process
Installing 'a10.acos_cli:*.*.*' to '/root/.ansible/collections/ansible_collections/a10/acos_cli'
Installing 'ansible.netcommon:6.0.0' to '/root/.ansible/collections/ansible_collections/ansible/netcommon'
In this example the collection directory path is: /root/.ansible/collections/ansible_collections/
git clone https://github.com/a10networks/a10-acos-cli.git
cd a10-acos-cli
ansible-galaxy collection build
ansible-galaxy collection install a10-acos_cli*.tar.gz -f
Add the two lines below to the /etc/ansible/ansible.cfg
file
cliconf_plugins = <collection-dir-path>/a10/acos_cli/plugins/cliconf
terminal_plugins = <collection-dir-path>/a10/acos_cli/plugins/terminal
- Copy terminal and cli_conf plugin into one of the following
- ~/.ansible/plugins
- /usr/share/ansible/plugins folder
- Export following environment variables for new session
[defaults]
export ANSIBLE_CLICONF_PLUGINS=<collection-dir-path>/a10/acos_cli/plugins/cliconf
export ANSIBLE_TERMINAL_PLUGINS=<collection-dir-path>/a10/acos_cli/plugins/terminal
- Save this variable in .bashrc File
[defaults]
export ANSIBLE_CLICONF_PLUGINS=<collection-dir-path>/a10/acos_cli/plugins/cliconf
export ANSIBLE_TERMINAL_PLUGINS=<collection-dir-path>/a10/acos_cli/plugins/terminal
Note: It is recommended to use the Ansible Vault for password storage. Futher information can be found here: https://docs.ansible.com/ansible/latest/user_guide/playbooks_vault.html#using-vault-in-playbooks
Ansible collections are a powerful way to organize and distribute Ansible content, such as roles, modules, and plugins.
Any of the following method can be used to create and run playbooks.
collections:
- a10.acos_cli
tasks:
- acos_command:
- argument
- acos_config
- argument
tasks:
- a10.acos_cli.acos_command:
- argument
- a10.acos_cli.acos_config
- argument
To search for a Ansible Module Configuration in the existing examples, perform the following steps:
-
Search the required Ansible Module configuration script directory, navigate to examples.
Example:
If you want to apply the configuration on Thunder, search for the acos_config.yml playbook.
-
Open the Ansible playbook from the directory.
Example:
Open acos_config.yml playbook under the examples directory.
-
Update the hosts parameter in playbook and add, modify, or remove the Ansible module configuration parameters and their corresponding values as appropriate.
- name: RUN COMMAND FOR CONFIGURE FILE
hosts: "{{desired_inventory_group}}"
gather_facts: false
become: True
tasks:
- name: run lines
a10.acos_cli.acos_config:
lines:
- ip dns primary 10.8.4.35
- slb template http template12
- slb server servertest 20.20.15.147
- port 74 tcp
- slb server serv13 20.15.27.126
- Save the playbook.
Sample Inventory file:
[vthunder]
<vthunder host_name/ip_address>
[vthunder:vars]
ansible_connection=network_cli
ansible_user=<username>
ansible_password=<password>
ansible_network_os=acos
ansible_become_password=<enable_password>
Use the following command to run the playbook:
ansible-playbook -i <path_to_inventory> <name_of_playbook>
To verify the applied configurations, follow below steps:
-
SSH into the Thunder device using your username and password.
-
Once connected, enter the following commands:
$ ansible-doc -M <collection-dir-path> <module_name>
$ ansible-doc -t cliconf acos
Example playbooks can be found here: https://github.com/a10networks/a10-acos-cli/tree/master/examples
$ ansible-test units --venv -v --python 3.6 tests/unit/modules/network/a10/test_acos*.py
All rights reserved @A10 Networks Inc.
For more information, please refer [/OPEN-SOURCE-Notice.pdf]
Please raise issue in github repository. Please include the Ansible playbook or ansible module files that demonstrates the bug and the command output and stack traces will be helpful.
For all issues, please send an email to support@a10networks.com with subject "a10-acos-cli"