Skip to content

Ansible Role - TransIP (for interacton with the TransIP API)

License

Notifications You must be signed in to change notification settings

rlenferink/ansible-role-transip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ansible Role: TransIP

Interacts in an idempotent way with the TransIP API for e.g. nameserver and DNS management.

Requirements

The python pyOpenSSL and requests packages are required on the Ansible executor node.

Role modules

This role contains a couple of Ansible modules used internally in this role:

  • transip_auth: Responsible for generating an API token with a validity of 1 hour. The generated API token will be used for interaction with the TransIP API.
  • transip_dns: Responsible for setting DNS records for the specified domain(s).
  • transip_nameserver: Responsible for setting nameservers for the specified domain(s).

Role variables

Available variables are listed below, along with default values (see defaults/main.yml):

transip_user: <not set>

The TransIP user to use for interaction with the TransIP API (required).

transip_private_key: <not set>

The private key for the specified user so an API token can be generated. A key pair needs to be generated in the TransIP control panel and specified here (either in plain text or as Ansible Vault encrypted value).

transip_domains: []

The domains to manage and which nameservers and DNS settings to set.

Example data

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

  - name: my-domain-2.com
    nameservers: # This domain uses the Cloudflare nameservers; so don't specify DNS records here.
      - kate.ns.cloudflare.com
      - ram.ns.cloudflare.com

About

Ansible Role - TransIP (for interacton with the TransIP API)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages