Collection of Ansible modules for managing UltraDNS zones and records
The UltraDNS Ansible collection provides ability to manage DNS zones and records on UltraDNS using Ansible tasks.
- Python 3.10 or later
- Ansible core 2.15 or later
- UltraDNS account
- UltraDNS Python REST API Client
- Python Requests module
zone- Configure a zone managed by UltraDNSsecondary_zone- Configure a zone using UltraDNS as secondary nameserverrecord- Configure DNS records in an UltraDNS managed zone
ansible-galaxy collection install ultradns.ultradnsYou can also include it in a requirements.yml file and install it via ansible-galaxy collection install -r requirements.yml using the format:
collections:
- name: ultradns.ultradnsTo upgrade the collection to the latest available version, run the following command:
ansible-galaxy collection install ultradns.ultradns --upgradeYou can also install a specific version of the collection, for example, if you need to downgrade when something is broken in the latest version (please report an issue in this repository). Use the following syntax where X.Y.Z can be any available version:
ansible-galaxy collection install ultradns.ultradns:==X.Y.ZUltraDNS Ansible modules run from the control node. Your tasks using ultradns.ultradns. modules must have the connection set to local. Setting up the local connection can be done a couple of ways, refer to Ansible documentation for more information.
- Put a localhost definition into your inventory
---
local:
hosts:
localhost:
ansible_connection: local
...- Alternatively, a local connection can be used in a single playbook play, even if other plays in the playbook use the default remote connection type
---
- hosts: 127.0.0.1
connection: localThe UltraDNS modules for Ansible call the UltraDNS API to make changes. Your tasks must know how to connect to your UltraDNS account, this can be done in the following ways:
UltraDNS modules provide an optional provider dictionary variable for UltraDNS authentication described as follows
provider:
username: string <your UltraDNS username>
password: string <your UltraDNS password>
use_test: boolean <true | false>usernameandpasswordprovide your UltraDNS credentialsuse_test: if true, forces the module to interact with the UltraDNS customer testing API instead of the main UltraDNS API. Default isfalse
When using the provider section it recommended to define a variable inside of a vault to hide the credentials. For example:
In your vault
ultra_provider:
use_test: false
username: <your UltraDNS username>
password: <your UltraDNS password>Then in your tasks, set the provider variable to "{{ ultra_provider }}" as:
tasks:
- name: ultradns primary zone
ultradns.ultradns.zone:
name: example.com.
account: accountname
state: present
provider: "{{ ultra_provider }}"The UltraDNS Ansible modules can also get the necessary credentials from environment variables. If there is no provider section or if the data in the provider is incomplete the modules will fallback to using the environment variables if they are available.
ULTRADNS_USERNAMEyour UltraDNS usernameULTRADNS_PASSWORDyour crendtial passwordULTRADNS_USE_TESTany value. If variable exists then use test environment
See the changelog
If you need assistance or have requests for the UltraDNS Ansible collection you can support from multiple channels:
-
GitHub Issues
- open a ticket in the UltraDNS ansible GitHub repository
-
UltraDNS Support
- contact UltraDNS support directly
Released under GNU General Public License v3.0 or later.
See LICENSE to see the full text.