- Python 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .github | ||
| examples | ||
| meta | ||
| plugins | ||
| .gitignore | ||
| CHANGELOG.md | ||
| galaxy.yml | ||
| LICENSE | ||
| README.md | ||
| README.pt.md | ||
| repo.json | ||
Ansible Collection for MozOut
Manage your MozOut VPS servers, domains and DNS records with Ansible. The collection uses only the public MozOut API (https://docs.mozout.com) and the Python standard library: nothing else to install.
Modules
| Module | What for |
|---|---|
mozout.cloud.vps |
Buy a VPS with credit, or manage one you have: start, stop, restart, time zone, reverse DNS |
mozout.cloud.vps_info |
List your servers or see one |
mozout.cloud.domain |
Register a domain, or manage one you have: nameservers, transfer lock, renewal |
mozout.cloud.domain_info |
List your domains, see one, or check if a name is free and its price |
mozout.cloud.dns_record |
Add, change or remove a DNS record |
mozout.cloud.dns_info |
Read the DNS zone of a domain |
mozout.cloud.catalog_info |
Products for sale, the options of one product, domain extensions and prices |
Every module supports check mode (--check) and is idempotent: running a playbook again changes only what is different.
Install
ansible-galaxy collection install mozout.cloud
Or from this repository:
ansible-galaxy collection build
ansible-galaxy collection install mozout-cloud-1.0.0.tar.gz
Needs ansible-core 2.14 or later and Python 3.6 or later.
Quick start
export MOZOUT_API_KEY="sandbox_..." # create the key in My MozOut
- hosts: localhost
gather_facts: false
tasks:
- name: Point www to the server
mozout.cloud.dns_record:
domain: example.com
name: www
type: A
value: 203.0.113.10
ttl: 3600
solo: true
Start with a sandbox_ key: it reads your real data, but every write is simulated and nothing is charged (the result has simulated: true). More playbooks in examples/.
To set the key once for every task, use the action group:
module_defaults:
group/mozout.cloud.all:
api_key: "{{ vault_api_key }}"
Good to know
- Buying a VPS or registering a domain is paid with the account credit, within the spending limit of the key. A VPS purchase needs
idempotency_key: the same task with the same key within 24 hours gets the same answer and is not charged again. Save the returned server id and useserver_idfrom then on. domainregisters only when the domain is not in the account yet. Withregister: falseit never buys.- The API cannot cancel services or delete domains. Cancel in My MozOut (https://www.my.mozout.com).
- The key needs these permissions:
catalog:read;vps:readandvps:write;domains:readanddomains:write;dns:readanddns:write;billing:purchaseto buy. - Errors show the API code and the
correlation_id, to give to support.429and5xxanswers are retried.
License
MIT. See LICENSE.
Create your API key in the API Center of My MozOut. Documentation: https://docs.mozout.com
Maintained by RLX Holdings.