syntropynet.syntropy.syntropy_network (0.1.4) — 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.1.4


Add to requirements.yml

  collections:
    - name: syntropynet.syntropy
      version: 0.1.4

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:
        name: p2p-network
        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:
        name: p2m-network
        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:
        name: mesh-network
        topology: mesh
        use_sdn: yes
        state: present
        connections:
            dns-servers:
                state: present
                type: tag

Inputs

    
id:
    default: null
    description: ID of the network. Has precedence before network name.
    required: false
    type: int

name:
    description: Name of the network.
    required: true
    type: str

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:
    default: null
    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: false
    type: dict

ignore_configured_topology:
    default: false
    description:
    - Instructs the platform to ignore currently configured network topology and
    - create/update connections between endpoints specified in connections according to
      the
    - topology specified in this config.
    - This parameter is mainly used to configure complex topologies consisting of multiple
      topologies.
    required: false
    type: bool

Outputs

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