zpe / zpe.zpecloud / 1.0.1 / inventory / zpecloud_nodegrid_inventory Inventory of Nodegrid devices located on ZPE Cloud Authors: Daniel Nesvera (@zpe-dnesvera)zpe.zpecloud.zpecloud_nodegrid_inventory (1.0.1) — inventory
Install with ansible-galaxy collection install zpe.zpecloud:==1.0.1
collections: - name: zpe.zpecloud version: 1.0.1
This plugin performs the following.
Fetch information about device, and store it as variables (hostname, model, serial number, status, and Nodegrid version).
Get Nodegrid devices located on ZPE Cloud. These devices are added to the inventory as hosts, and indexed their serial number.
Create default groups (available, enrolled, failover, online, offline). These groups are added to the inventory with the prefix zpecloud_device_<name>.
Create groups based on ZPE Cloud groups. These groups are added to the inventory with the prefix zpecloud_group_<group-name>.
Create groups based on ZPE Cloud sites. These groups are added to the inventory with the prefix zpecloud_site_<site-name>.
Fetch custom fields from ZPE Cloud, and assign to devices as variables. These variables are added to the inventory with the prefix zpecloud_cf_<name>.
Custom fields have scopes (global, group, site, and device).
If multiple custom fields share the same name, inventory variable will receive the value of the scope with higher priority.
Device scope has higher priority, and global scope the lower.
It requires a YAML configuration file with name "zpecloud.yml".
url: default: https://zpecloud.com description: - URL of ZPE Cloud instance. env: - name: ZPECLOUD_URL type: string password: description: - User password. - Required for authentication with username and password. env: - name: ZPECLOUD_PASSWORD required: true type: string username: description: - Username on ZPE Cloud. - Required for authentication with username and password. env: - name: ZPECLOUD_USERNAME required: true type: string organization: description: - Organization name inside ZPE Cloud. Used to switch organization if user has accounts in multiple organizations. - This field is case sensitive. env: - name: ZPECLOUD_ORGANIZATION type: string