rlenferink.transip

Ansible Role: TransIP

This role allows you to work with the TransIP API in a way that avoids repeating actions, particularly for managing nameservers and DNS settings.

Requirements

You need to have the Python packages pyOpenSSL and requests installed on the machine where Ansible runs.

Role Modules

This role includes a few Ansible modules that help perform specific tasks:

  • transip_auth: This module creates an API token that lasts for 1 hour. This token is used to communicate with the TransIP API.
  • transip_dns: This module is used to set DNS records for your chosen domain(s).
  • transip_nameserver: This module sets nameservers for your chosen domain(s).

Role Variables

Here are the variables you can use, along with their default values (see defaults/main.yml):

transip_user: <not set>

The TransIP username needed to use the API (this is required).

transip_private_key: <not set>

The private key for the user, which is necessary to generate an API token. You must create a key pair in the TransIP control panel and provide it here (either as plain text or as an Ansible Vault encrypted value).

transip_domains: []

A list of domains you want to manage, including their nameserver and DNS settings.

Example Data

Here’s an example setup:

transip_domains:
  - name: my-domain-1.com
    nameservers: # Using TransIP nameservers for this domain
      - ns0.transip.net
      - ns1.transip.nl
      - ns2.transip.eu
    dns_records: # DNS records for the domain; any unspecified entries will be removed
      - name: www
        expire: 86400
        type: "A"
        content: "1.2.3.4"

  - name: my-domain-2.com
    nameservers: # This domain uses Cloudflare nameservers; DNS records will not be specified here.
      - kate.ns.cloudflare.com
      - ram.ns.cloudflare.com
Informazioni sul progetto

TransIP domain management.

Installa
ansible-galaxy install rlenferink.transip
Licenza
mit
Download
570
Proprietario
Software Engineer / ASF Member