cwilloughby_bw.racktables.racktables_ipv4_nextfree (1.0.9) — lookup

Lookup the next free ipv4 address that matches the provided tags

| "added in version" 0.0 of cwilloughby_bw.racktables"

Authors: Chandler Willoughby

Install collection

Install with ansible-galaxy collection install cwilloughby_bw.racktables:==1.0.9


Add to requirements.yml

  collections:
    - name: cwilloughby_bw.racktables
      version: 1.0.9

Description

Returns a new IPv4 address/gateway/netmask that matches the provided tags


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: lookup object network information
  debug: msg="{{ lookup('racktables_ipv4_nextfree', rt_host='rackhost.local', rt_username='rackuser', rt_password='sup3r$3cur3', rt_database='rackdb', tags=('LAB1-RDU','trust','application')) }}"

Inputs

    
tags:
    description: A list containg the tags that the networks should have
    required: true
    type: list

rt_host:
    description: Hostname of the database server backing Racktables
    required: true
    type: string

rt_port:
    default: 3306
    description: Port for the database connection, defaults to 3306
    required: false
    type: integer

rt_database:
    description: Name of the database which backs Racktables
    required: true
    type: string

rt_password:
    description: Password for the administrative user
    required: true
    type: string

rt_username:
    description: Username that has administrative access to the racktables database
    required: true
    type: string

Outputs

_ipaddress:
  description:
  - Dictionary containing the candidate IP address
  type: dict