Giter VIP home page Giter VIP logo

a10-acos-cli's Introduction

A10 ACOS CLI Plugin Modules

Installation

We only support Ansible version >=2.9

1. Install from galaxy hub

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/

2. Set plugin path

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

2a. Alternative methods to set path

  1. Copy terminal and cli_conf plugin into one of the following
  • ~/.ansible/plugins
  • /usr/share/ansible/plugins folder
  1. 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
  1. 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

3. Add device information to 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>

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

Usage & Documenation

Option 1 (Ansbile >=2.8): Use the 'collections' keyword

collections:
  - a10.acos_cli

tasks:
  - acos_command:
    - argument
  - acos_config
    - argument

Option 2: Use the FQCN (namespace.collection_name.module_name)

tasks:
  - a10.acos_cli.acos_command:
    - argument
  - a10.acos_cli.acos_config
    - argument

Module Documentation

$ ansible-doc -M <collection-dir-path> <module_name>

Plugin Documentation

$ ansible-doc -t cliconf acos 

Example Playbooks

Example playbooks can be found here: https://github.com/a10networks/a10-acos-cli/tree/master/examples

Contributing

Clone from github

$ git clone [email protected]:a10networks/a10-acos-cli.git

Methods to set collection path (Only one required)

  1. Copy collection folder we got from tarball inside
  • ~/.ansible/collections
  • /usr/share/ansible/collections folder
  1. Export following environment variables for new session
ANSIBLE_COLLECTIONS_PATHS=<path-to-collections-folders>
  1. Add below line in /etc/ansible/ansible.cfg File
collections_paths=<path-to-collection1>:<path-to-collection2>
  1. Keep your playbooks to run in relative to collection
	|── myplaybook.yml
	├── collections/
	│   └── ansible_collections/
	│               └── a10/
	│                   └── acos_cli/<collection structure lives here>

Testing

$ ansible-test units --venv -v --python 3.6 tests/unit/modules/network/a10/test_acos*.py 

Issues and Inquiries

For all issues, please send an email to [email protected]

For general inquiries, please send an email to [email protected]

a10-acos-cli's People

Contributors

hthompson6 avatar nehakembalkara10 avatar omkar-bhujbal11 avatar rahulkatre-a10 avatar rahulkatre14 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.