dnsimple-dns-a-record
Example:
# Add a record for 'dev.cutecode.co'. - dnsimple-dns-a-record: account_mail: [email protected] api_token: 123..xyz record: dev domain: cutecode.co ip: 123.123.123.123
Description
Add an 'A' record to a dnsimple domain.
Variables
Name | Type | Default | Description |
---|---|---|---|
|
string | -- | The dnsimple account email. Required |
|
string | -- | A dnsimple api token. Required |
|
string | -- | The (main) domain name. Required |
|
string | -- | The ip address to point to. Required |
|
string | -- | The sub-domain name to create (without the main domain name). Required |
|
integer | -- | The time to life of the record. |
Examples
Example 1
Add a record for 'dev.cutecode.co'.
Code
- dnsimple-dns-a-record: account_mail: [email protected] api_token: 123..xyz record: dev domain: cutecode.co ip: 123.123.123.123
Code
doc: short_help: Add an 'A' record to a dnsimple domain. examples: - title: Add a record for 'dev.cutecode.co'. vars: account_mail: [email protected] api_token: 123..xyz record: dev domain: cutecode.co ip: 123.123.123.123 args: api_token: doc: short_help: A dnsimple api token. type: string secret: true required: true account_email: doc: short_help: The dnsimple account email. type: string required: true domain: doc: short_help: The (main) domain name. type: string required: true record: doc: short_help: The sub-domain name to create (without the main domain name). type: string ip: doc: short_help: The ip address to point to. type: string required: true ttl: doc: short_help: The time to life of the record. type: integer required: false frecklets: - frecklet: name: dnsimple type: ansible-module desc: short: Add dns A record to dnsimple. properties: internet: true elevated: false idempotent: true resources: python-package: - dnsimple>=1.0.0 task: delegate_to: localhost vars: account_api_token: '{{:: api_token ::}}' account_email: '{{:: account_email ::}}' domain: '{{:: domain ::}}' record: '{{:: record ::}}' type: A value: '{{:: ip ::}}' ttl: '{{:: ttl ::}}' state: present
frecklecute --community dnsimple-dns-a-record --help Usage: frecklecute dnsimple-dns-a-record [OPTIONS] Add an 'A' record to a dnsimple domain. Options: --account-email ACCOUNT_EMAIL The dnsimple account email. [required] --api-token API_TOKEN A dnsimple api token. [required] --domain DOMAIN The (main) domain name. [required] --ip IP The ip address to point to. [required] --record RECORD The sub-domain name to create (without the main domain name). [required] --ttl TTL The time to life of the record. --help Show this message and exit.
# -*- coding: utf-8 -*- # # module path: pycklets.dnsimple_dns_a_record.DnsimpleDnsARecord # from dataclasses import dataclass from pyckles import AutoPycklet from typing import * # noqa @dataclass class DnsimpleDnsARecord(AutoPycklet): """Add an 'A' record to a dnsimple domain. Args: account_email: The dnsimple account email. api_token: A dnsimple api token. domain: The (main) domain name. ip: The ip address to point to. record: The sub-domain name to create (without the main domain name). ttl: The time to life of the record. """ FRECKLET_ID = "dnsimple-dns-a-record" account_email: str = None api_token: str = None domain: str = None ip: str = None record: str = None ttl: int = None def __post_init__(self): super(DnsimpleDnsARecord, self).__init__(var_names=["account_email", "api_token", "domain", "ip", "record", "ttl"]) frecklet_class = DnsimpleDnsARecord
# -*- coding: utf-8 -*- # # module path: pycklets.dnsimple_dns_a_record.DnsimpleDnsARecord # from pyckles import AutoPycklet class DnsimpleDnsARecord(AutoPycklet): """Add an 'A' record to a dnsimple domain. Args: account_email: The dnsimple account email. api_token: A dnsimple api token. domain: The (main) domain name. ip: The ip address to point to. record: The sub-domain name to create (without the main domain name). ttl: The time to life of the record. """ FRECKLET_ID = "dnsimple-dns-a-record" def __init__(self, account_email=None, api_token=None, domain=None, ip=None, record=None, ttl=None): super(DnsimpleDnsARecord, self).__init__(var_names=["account_email", "api_token", "domain", "ip", "record", "ttl"]) self._account_email = account_email self._api_token = api_token self._domain = domain self._ip = ip self._record = record self._ttl = ttl @property def account_email(self): return self._account_email @account_email.setter def account_email(self, account_email): self._account_email = account_email @property def api_token(self): return self._api_token @api_token.setter def api_token(self, api_token): self._api_token = api_token @property def domain(self): return self._domain @domain.setter def domain(self, domain): self._domain = domain @property def ip(self): return self._ip @ip.setter def ip(self, ip): self._ip = ip @property def record(self): return self._record @record.setter def record(self, record): self._record = record @property def ttl(self): return self._ttl @ttl.setter def ttl(self, ttl): self._ttl = ttl frecklet_class = DnsimpleDnsARecord