Ansible Modules: tacp_info
The tacp_info module retrieves information about application instances, application groups, categories, datacenters, firewall profiles, marketplace templates, migration zones, sites, storage pools, tags, users, and virtual networks (VLANs and VNETs).
The tacp_info module provides the following functions to retrieve inventory information:
Application instances
Application groups
Categories
Datacenters
Firewall profiles
Marketplace templates
Migration zones
Sites
Storage Pools
Tags
Users
VLAN networks
VNET networks
Sample Playbook
For more information about the parameters used with the tacp_info module, run the following command:
ansible-doc -t module tacp_info
For more information about obtaining the API key, which is used to access the ThinkAgile CP Cloud Controller, see the following topic:
Retrieve application instances details
The following is an Ansible playbook in .yml format that retrieves details about the application instances present on the ThinkAgile CP stack:
- name: Retrieve application instances details
hosts: localhost
gather_facts: false
vars:
api_key: <api-key-created-from-the-developer-options-page>
tasks:
- name: Retrieve details about application instances from ThinkAgile CP
tacp_info:
api_key: "{{ api_key}}"
resource: instance
Retrieve virtual datacenter and network details
The following Ansible playbook retrieves details about the virtual datacenters (VDCs) and the networks present on the ThinkAgile CP stack:
- name: Retrieve virtual datacenter and network details
hosts: localhost
gather_facts: false
vars:
api_key: <api-key-created-from-the-developer-options-page>
tasks:
- name: Retrieve details about virtual datacenters and networks from ThinkAgile CP
tacp_info:
api_key: "{{ api_key}}"
resource: "{{ resource }}"
loop:
- datacenter
- vlan
- vnet
loop_control:
loop_var: resource
Retrieve the available Marketplace application templates
The following Ansible playbook retrieves a list of the available application templates from the Lenovo Cloud Marketplace:
- name: Retrieve virtual datacenter and network details
hosts: localhost
gather_facts: false
vars:
api_key: <api-key-created-from-the-developer-options-page>
tasks:
- name: Retrieve a list of the available marketplace application templates from ThinkAgile CP
tacp_info:
api_key: "{{ api_key}}"
resource: marketplace_template