zpe.zpecloud.zpecloud (1.0.1) — connection

This connection plugin allows Ansible to execute tasks on Nodegrid devices via ZPE Cloud API.

Authors: Daniel Nesvera (@zpe-dnesvera)

Install collection

Install with ansible-galaxy collection install zpe.zpecloud:==1.0.1


Add to requirements.yml

  collections:
    - name: zpe.zpecloud
      version: 1.0.1

Description

Run commands or put/fetch files to Nodegrid device enrolled on ZPE Cloud.

Uses python requests library to interact with ZPE Cloud API.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# example playbook_nodegrid.yml
---
- name: Get uptime from Nodegrid device
  vars:
    ansible_connection: zpe.zpecloud.zpecloud
    ansible_zpecloud_username: myuser@mycompany.com
    ansible_zpecloud_password: mysecurepassword
    ansible_zpecloud_url: "https://zpecloud.com"
    ansible_zpecloud_organization: "My second organization"
  hosts: zpecloud_device_online
  gather_facts: no
  tasks:
  - name: Shell command
    shell: uptime -p

Inputs

    
url:
    default: https://zpecloud.com
    description:
    - URL of ZPE Cloud instance.
    env:
    - name: ZPECLOUD_URL
    type: string
    vars:
    - name: ansible_zpecloud_url

password:
    description:
    - User password.
    - Required for authentication with username and password.
    env:
    - name: ZPECLOUD_PASSWORD
    required: true
    type: string
    vars:
    - name: ansible_zpecloud_password

username:
    description:
    - Username on ZPE Cloud.
    - Required for authentication with username and password.
    env:
    - name: ZPECLOUD_USERNAME
    required: true
    type: string
    vars:
    - name: ansible_zpecloud_username

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
    vars:
    - name: ansible_zpecloud_organization