An Ansible module for returning attribute info for a given scope.
The module takes several optional parameters:
scope for specifying the scope of the data to return. Valid choices are: global (default), appliance, os, environment, and host.
name for requesting the data for a specific item in the scope. If name is not provided, then all data for that scope is returned.
attr to specify attributes to return data about. Can be a shell syntax glob pattern.
shadow to control if shadow attributes are returned in the data. Defaults to True.
The data returned is a list of attributes.
Example playbook:
---
- hosts: localhost
tasks:
- name: Get attributes for the backend appliance
stacki_attribute_info:
name: backend
scope: appliance
register: result
- name: Appliance attribute output
debug:
var: result
- name: Get the os.version attribute for backend-0-0
stacki_attribute_info:
name: backend-0-0
scope: host
attr: os.version
register: result
- name: Host backend-0-0 attribute output
debug:
var: result
Output of the debug commands, showing the structure of the data returned:
An Ansible module for returning attribute info for a given scope.
The module takes several optional parameters:
scope
for specifying the scope of the data to return. Valid choices are:global
(default),appliance
,os
,environment
, andhost
.name
for requesting the data for a specific item in the scope. If name is not provided, then all data for that scope is returned.attr
to specify attributes to return data about. Can be a shell syntax glob pattern.shadow
to control if shadow attributes are returned in the data. Defaults to True.The data returned is a list of
attributes
.Example playbook:
Output of the debug commands, showing the structure of the data returned: