Appendix - Provided Playbooks - Adaptive Plugins - BlueCat Gateway - 2.9

Ansible Module Administration Guide

Locale
English
Product name
BlueCat Gateway
Version
2.9
Included with the BlueCat Ansible Module is a series of standalone playbooks, split into two categories:
  • BAM
  • BDDS
Below is a table of each provided playbook and its function.

BAM Playbooks

Unless specified, the properties to include in a post or patch action are optional. If included, properties must appear in the json_data. If using default values for the configuration or view inputs, the values do not need to be included in the resource_path, as configured in the Gateway server.

Playbook Function Inputs
add_cname_record.yml Creates a CNAME record in the specified DNS zone.
  • resource_path
    • configuration
    • view
    • zone
  • json_data
    • absolute_name
      • FQDN of CNAME
    • linked_record
      • The host record that CNAME will be linked to
    • ttl
add_configuration.yml Creates a configuration object in Address Manager.
  • json_data
    • name
add_external_host_record.yml Creates an external host record for use in a specified view.
  • resource_path
    • configuration
    • view
  • json_data
    • absolute_name
      • FQDN of external host
add_host_record.yml

Creates a host record in the specified zone.

The provided playbook assumes creation in the default configuration and view.
  • resource_path

    • configuration
    • view
    • zone
  • json_data

    • absolute_name
      • FQDN of host record
    • ip4_address
  • ttl
add_ip4_network.yml

Creates an IP4 network in the specified IP4 block.

The provided playbook assumes the need to only traverse 3 IP4 blocks to reach the target, but there is no limit to the number of blocks that can be included in the block value.
  • resource_path

    • configuration
    • block
  • json_data

  • cidr
add_next_available_ip.yml

Assigns the next available address in the specified IP4 network.

The following are supported values for the action to take:

  • MAKE_DHCP_RESERVED
  • MAKE_RESERVED
  • MAKE_STATIC
The hostinfo value is not used with the MAKE_DHCP_RESERVED action, but it still needs to be provided. For more information on hostinfo, refer to the Address Manager API Guide.
  • resource_path

    • configuration
    • network
  • json_data

    • mac_address
    • hostinfo
    • action
    • ip4_address_properties
add_next_available_ip4_network.yml

Creates the next available IP4 network in the specified IP4 block.

The provided playbook assumes the need to only traverse 3 IP4 blocks to reach the target, but there is no limit to the number of blocks that can be included in the block value.
  • resource_path

    • configuration
    • block
  • json_data

    • name
    • size
      • The number of addresses in the network, including gateway and broadcast
delete_external_host_record.yml Deletes an external host record from the specified view.
  • resource_path

    • configuration
    • view
    • absolute_name
      • FQDN of external host
delete_host_record.yml

Deletes a specified host record.

The provided playbook assumes the host record is in the default configuration and view.
  • resource_path
    • configuration
    • view
    • absolute_name
      • FQDN of external host
get_configurations.yml Returns an Address Manager entity for each configuration in Address Manager. N/A
get_dns_zone.yml

Returns an Address Manager entity for the specified zone.

The provided playbook assumes the zone is in the default configuration and view.
  • resource_path

    • configuration
    • view
    • zone
get_dns_zones.yml

Returns an Address Manager entity for each zone under the specified zone.

The provided playbook assumes the zone is in the default configuration and view.
  • resource_path
    • configuration
    • view
    • zone
get_host_record.yml

Returns an Address Manager entity for the specified host.

The provided playbook assumes the host is in the default configuration and view.
  • resource_path

    • configuration
    • view
    • zone
    • absolute_name
      • FQDN of host record
get_ip4_block.yml

Returns an Address Manager entity for the specified IP4 block.

The provided playbook assumes the IP4 block is in the default configuration.
  • resource_path
    • configuration
    • block
get_ip4_blocks.yml

Returns an Address Manager entity for each IP4 block under the specified IP4 block.

The provided playbook assumes the IP4 block is in the default configuration.
  • resource_path
    • configuration
    • block
get_ip4_network.yml Returns an Address Manager entity for the specified IP4 network.
  • resource_path

    • configuration
    • network
get_ip4_networks.yml

Returns an Address Manager entity for each IP4 network under the specified IP4 block.

The provided playbook assumes the IP4 block is in the default configuration.
  • resource_path

    • configuration
    • network
get_next_available_ip.yml Returns an Address Manager entity for the next available IP address in the specified IP4 network.
  • resource_path

    • configuration
    • network
patch_host_record.yml

Updates the specified host record with a new IP address, TTL, or property.

The provided playbook assumes the host is in the default configuration and view.
  • resource_path

    • configuration
    • view
    • absolute_name
      • FQDN of host record
  • json_data

    • ip4_address
    • ttl
query_dns.yml Uses the dnspython library to execute DNS queries. N/A
reserve_ip.yml Assigns the specified IP4 address as DHCP Reserved.
  • resource_path

    • configuration
    • ipv4_address
  • json_data

    • mac_address
    • hostinfo
    • action
search_for_hosts_by_hint.yml

Searches Address Manager for host records matching the provided hint.

The host_hint value accepts the following basic regex characters:

  • ^
  • $
  • ?
  • *
  • resource_path

    • configuration
    • view
    • host_hint
search_for_objects.yml

Searches Address Manager for objects of any supported type that match the provided keyword, filtering on property values.

Only the first 1000 results will be returned.

The search_filters must be a list of property=value pairs, separated by commas or “/search/”.

For more information on supported object types, refer to the Address Manager API Guide.

The search_pattern value accepts the following basic regex characters:

  • ^
  • $
  • ?
  • *
  • resource_path

    • search_pattern
    • object_type
    • search_filters

BDDS Playbooks

The following playbooks allow for the automation of some configuration tasks in a DNS/DHCP Server and require the server be included in the list of inventory hosts. All listed inputs are mandatory.

Playbook Function Inputs
add_name_server.yml Adds a name server to the name server configuration via the Admin CLI and updates the resolv.conf file.
  • name_server_ip
    • The IP of a name server to add
change_ip_address.yml

Modifies the IP address of the DNS/DHCP Server.

Prior to executing this playbook, you must first either disable the server in Address Manager or execute the remove_server_from_BAM_control.yml playbook. The server will also need to be replaced in Address Manager to re-establish proper management connectivity.

Note:
  • This playbook should be used in conjunction with the set_default_gateway.yml playbook to ensure proper connectivity
  • This playbook does not support modifying the IP of a node in an XHA cluster.
  • if_num
    • A number to identify the interface being modified. Typically, the value is 0.
  • ip
    • The new IP address to configure
  • net_bits
    • The subnet mask in CIDR format. For example, a subnet mask of 255.255.255.0 will be represented as the number 24.
custom_ntp.yml

Replaces the default ntp.conf file with a custom configuration.

If you are managing service configuration from Address Manager, the NTP service will indicate it is in manual override. Any updates from Address Manager will overwrite the custom configuration.
  • src
    • The path the playbook will use to find the custom ntp.conf
custom_syslog.conf

Adds a custom syslog configuration to the default configuration.

If a custom configuration directory already exists, there is no requirement to create a new one – multiple configuration files can be included in a single directory.
  • conf_directory
    • The syslog configuration directory to create that will contain the new custom configuration file(s)
  • src
    • The path the playbook will use to find the custom configuration file
license.server.yml

Updates the license information of a virtual DNS/DHCP Server. A valid license is required for deployment and management of virtual servers.

If you are unsure of your license information, contact BlueCat Customer Care or your BlueCat Account Executive.
  • client_id
    • Client ID provided when the licensing information was received
  • license_key
    • License key provided when the licensing information was received
remove_name_server.yml Removes a name server from the name server configuration via the Admin CLI and updates the resolv.conf file.
  • name_server_ip
    • The IP of a name server to remove
remove_server_from_BAM_control.yml

Breaks the management connection between Address Manager and the affected server and should only be used if modifying an IP address of a managed server or after a server has been disabled in Address Manager.

Note: This playbook does not support removing XHA cluster nodes from Address Manager control.
  • resource_path

    • configuration
    • block
  • json_data

    • name
    • size
      • the number of addresses in the network, including gateway and broadcast
set_default_gateway.yml

Configures the default gateway for the services interface through the Admin CLI and updates routes as appropriate.

Note: This playbook should be used in conjunction with the change_ip_address.yml playbook to ensure proper connectivity.
  • gateway_ip

    • IP address of the gateway to use for the services interface (eth0)

set_time_zone.yml

Updates the server’s time zone through the Admin CLI, including the required reboot to complete the change.

The accompanying time_zones.csv file can be used to determine the required values.

For example, the values for setting the time zone to Eastern Time (Toronto) are:

  • continent: 2
  • country: 10
  • region: 7
  • continent

    • A number selected from the Continent column of the time_zones.csv file
  • country
    • A number selected from the Country column of the time_zones.csv file
    • Remove the {{ country }}\n portion if there is no country to select (for example, when using continent 10 or 11)
  • region
    • A number selected from the region column of the time_zones.csv file
    • Remove the {{ region }}\n portion if there is no region to select