phoenixnap / phoenixnap.bmc / 1.17.0 / module / tag_info Gather information about phoenixNAP BMC tags | "added in version" 0.12.0 of phoenixnap.bmc" Authors: Pavle Jojkic (@pajuga) <pavlej@phoenixnap.com>, Goran Jelenic (@goranje) <goranje@phoenixnap.com> preview | supported by certifiedphoenixnap.bmc.tag_info (1.17.0) — module
Install with ansible-galaxy collection install phoenixnap.bmc:==1.17.0
collections: - name: phoenixnap.bmc version: 1.17.0
Gather information about tags available.
This module has a dependency on requests
# All the examples assume that you have file config.yaml with your 'clientId' and 'clientSecret' # in location: ~/.pnap/config.yaml - name: List all tags hosts: localhost gather_facts: false vars_files: - ~/.pnap/config.yaml tasks: - name: List all tags information for account phoenixnap.bmc.tag_info: client_id: "{{ clientId }}" client_secret: "{{ clientSecret }}" register: output - name: Print the gathered infos ansible.builtin.debug: var: output.tags
- name: List the tag details hosts: localhost gather_facts: false vars_files: - ~/.pnap/config.yaml tasks: - name: List tags information based on the specified names phoenixnap.bmc.network_info: client_id: "{{ clientId }}" client_secret: "{{ clientSecret }}" names: [Environment] register: output - name: Print the gathered infos ansible.builtin.debug: var: output.tags
names: description: The unique name of the tag. elements: str type: list client_id: description: Client ID (Application Management) type: str client_secret: description: Client Secret (Application Management) type: str
tags: contains: description: description: The description of the tag. returned: always sample: This tag is used for all resources that need to be assigned to an environment. type: str id: description: The unique id of the tag. returned: always sample: 604721852cf65253d151528b type: str isBillingTag: description: Whether or not to show the tag as part of billing and invoices. returned: always sample: true type: bool name: description: The name of the tag. returned: always sample: Environment type: str resourceAssignments: contains: resourceName: description: The resource name. sample: /bmc/servers/60ffafcdffb8b074c7968dad type: str value: description: The value of the tag assigned to the resource. sample: DEV type: str description: The tag's assigned resources. returned: always type: list description: The tags information as list returned: success type: complex