syntropynet.syntropy.syntropy_network (0.3.0) — module

Manages networks and connections on Syntropy Platform.

| "added in version" 0.1.0 of syntropynet.syntropy"

Authors: Andrius Mikonis (@foxis)

Install collection

Install with ansible-galaxy collection install syntropynet.syntropy:==0.3.0


Add to requirements.yml

  collections:
    - name: syntropynet.syntropy
      version: 0.3.0

Description

Allows to create/delete networks between endpoints using configuration embedded in the playbook.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
-   name: Create a Point to point network
    syntropynetwork:
        topology: p2p
        use_sdn: no
        state: present
        connections:
            endpoint-1:
                state: present
                connect_to:
                    endpoint-2
            endpoint-3:
                state: present
                connect_to:
                    endpoint-4
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
-   name: Create a Point to multi-point network using tags
    syntropynetwork:
        topology: p2m
        use_sdn: no
        state: present
        connections:
            endpoint-1:
                state: present
                type: endpoint
                connect_to:
                    iot-devices:
                        type: tag
                        state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
-   name: Create a mesh network using tags
    syntropynetwork:
        topology: mesh
        use_sdn: yes
        state: present
        connections:
            dns-servers:
                state: present
                type: tag

Inputs

    
state:
    choices:
    - present
    - absent
    default: present
    description: A desired state of the API key.
    required: false
    type: str

api_url:
    default: null
    description:
    - URL Of the Platform API.
    - This parameter is required if SYNTROPY_API_SERVER environment variable is not set.
    required: false
    type: str

topology:
    choices:
    - p2p
    - p2m
    - mesh
    description: Network topology.
    required: true
    type: str

api_token:
    default: null
    description:
    - API Authorization token string.
    - This parameter is required if SYNTROPY_API_TOKEN environment variable is not set.
    required: false
    type: str

connections:
    description:
    - A dictionary specifying network connections. A key represents the name of the endpoint
      or tag name of a set of endpoints.
    - Each endpoint has a mandatory option 'type' which is one of 'endpoint' or 'tag'
      and a 'state' option that is one of 'present' or 'absent'.
    - For p2p or p2m networks a connections supports 'connect_to' option which is a dictionary
      containing endpoint names/tags as keys.
    required: true
    type: dict

Outputs

error:
  description: Error message upon unsuccessful configuration.
  returned: always
  sample: Syntropy API call resulted in an error
  type: str