ansible.builtin.ucs_dns_server (v2.9.0) — module

Configure DNS servers on Cisco UCS Manager

| "added in version" 2.8 of ansible.builtin"

Authors: John McDonough (@movinalot), CiscoUcs (@CiscoUcs)

preview | supported by community

Install Ansible via pip

Install with pip install ansible==2.9.0

Description

Configure DNS servers on Cisco UCS Manager.

Examples can be used with the L(UCS Platform Emulator,https://communities.cisco.com/ucspe).


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Configure DNS server
  ucs_dns_server:
    hostname: 172.16.143.150
    username: admin
    password: password
    dns_server: 10.10.10.10
    description: DNS Server IP address
    state: present
    delegate_to: localhost
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Remove DNS server
  ucs_dns_server:
    hostname: 172.16.143.150
    username: admin
    password: password
    dns_server: 10.10.10.10
    state: absent
    delegate_to: localhost

Inputs

    
port:
    description:
    - Port number to be used during connection (by default uses 443 for https and 80 for
      http connection).
    type: int

proxy:
    description:
    - If use_proxy is no, specfies proxy to be used for connection. e.g. 'http://proxy.xy.z:8080'
    type: str

state:
    choices:
    - absent
    - present
    default: present
    description:
    - If C(absent), will remove a DNS server.
    - If C(present), will add or update a DNS server.
    type: str

use_ssl:
    default: true
    description:
    - If C(no), an HTTP connection will be used instead of the default HTTPS connection.
    type: bool

hostname:
    description:
    - IP address or hostname of Cisco UCS Manager.
    - Modules can be used with the UCS Platform Emulator U(https://cs.co/ucspe)
    required: true
    type: str

password:
    description:
    - Password for Cisco UCS Manager authentication.
    required: true
    type: str

username:
    default: admin
    description:
    - Username for Cisco UCS Manager authentication.
    type: str

use_proxy:
    default: true
    description:
    - If C(no), will not use the proxy as defined by system environment variable.
    type: bool

dns_server:
    aliases:
    - name
    description:
    - DNS server IP address.
    - Enter a valid IPV4 Address.
    - UCS Manager supports up to 4 DNS Servers
    type: str

delegate_to:
    default: localhost
    description:
    - Where the module will be run
    type: str

description:
    aliases:
    - descr
    description:
    - A user-defined description of the DNS server.
    - Enter up to 256 characters.
    - 'You can use any characters or spaces except the following:'
    - '` (accent mark),  (backslash), ^ (carat), " (double quote), = (equal sign), > (greater
      than), < (less than), or '' (single quote).'
    type: str