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:1.0.1' to '/opt/.ansible/collections/ansible_collections/a10/acos_cli'
Installing 'ansible.netcommon:0.0.2' to '/opt/.ansible/collections/ansible_collections/ansible/netcommon'
In this example the collection directory path is: /opt/.ansible/collections/ansible_collections/
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
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
export ANSIBLE_CLICONF_PLUGINS=<collection-dir-path>/a10/acos_cli/plugins/cliconf
export ANSIBLE_TERMINAL_PLUGINS=<collection-dir-path>/a10/acos_cli/plugins/terminal
[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>
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
collections:
- a10.acos_cli
tasks:
- acos_command:
- argument
- acos_config
- argument
tasks:
- a10.acos_cli.acos_command:
- argument
- a10.acos_cli.acos_config
- argument
$ 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
$ git clone [email protected]:a10networks/a10-acos-cli.git
- Copy collection folder we got from tarball inside
- ~/.ansible/collections
- /usr/share/ansible/collections folder
- Export following environment variables for new session
ANSIBLE_COLLECTIONS_PATHS=<path-to-collections-folders>
- Add below line in /etc/ansible/ansible.cfg File
collections_paths=<path-to-collection1>:<path-to-collection2>
- Keep your playbooks to run in relative to collection
|── myplaybook.yml
├── collections/
│ └── ansible_collections/
│ └── a10/
│ └── acos_cli/<collection structure lives here>
$ ansible-test units --venv -v --python 3.6 tests/unit/modules/network/a10/test_acos*.py
For all issues, please send an email to [email protected]
For general inquiries, please send an email to [email protected]