qrkourier.netfoundry.netfoundry_endpoint (1.2.0) — module

Create, update, or delete an Endpoint

| "added in version" 1.1.0 of qrkourier.netfoundry"

Authors: Kenneth Bingham (@qrkourier)

Install collection

Install with ansible-galaxy collection install qrkourier.netfoundry:==1.2.0


Add to requirements.yml

  collections:
    - name: qrkourier.netfoundry
      version: 1.2.0

Description

Create and update always have result=changed


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
  - name: create Endpoint
    netfoundry_endpoint:
      name: "{{ item }}"
      state: PROVISIONED
      network: "{{ netfoundry_info.network }}"
      attributes:
      - "#dialers"
      dest: /tmp/ott  # directory in which to save {{ item }}.jwt
    loop: "{{ endpointNames }}"
    when: item not in netfoundry_info.endpoints|map(attribute='name')|list
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
  - name: Delete all Endpoints
    netfoundry_endpoint:
      name: "{{ item }}"
      state: DELETED
      network: "{{ netfoundry_info.network }}"
    loop: "{{ netfoundry_info.endpoints|map(attribute='name')|list }}"

Inputs

    
dest:
    description: Path to directory or file named like *.jwt in which to save the enrollment
      one-time-token JWT. If a directory is specified then it will be created if necessary
      and the filename will be that of the Endpoint, including whitespace, and must have
      filename suffix *.jwt.
    required: false
    type: path

name:
    description: The name of the Endpoint.
    required: true
    type: str

state:
    choices:
    - PROVISIONED
    - DELETED
    default: PROVISIONED
    description: The desired state.
    required: false
    type: str

network:
    description: The dictionary describing the Network on which to operate from network_info.network.
    required: true
    type: dict

attributes:
    description: A list of Endpoint role attributes prefixed with a \#hash mark.
    required: false
    type: list

Outputs

message:
  description: The HTTP response from the create, update, or delete operation.
  returned: always
  type: dict