- Python 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .github | ||
| examples | ||
| meta | ||
| plugins | ||
| .gitignore | ||
| CHANGELOG.md | ||
| galaxy.yml | ||
| LICENSE | ||
| README-pt.md | ||
| README.md | ||
| repo.json | ||
Ansible Collection for Interweb Angola
Manage your Interweb Angola VPS servers, domains and DNS records with Ansible. The collection uses only the public Interweb Angola API (https://docs.interweb.ao) and the Python standard library: nothing else to install.
Modules
| Module | What for |
|---|---|
interweb_ao.cloud.vps |
Buy a VPS with credit, or manage one you have: start, stop, restart, time zone, reverse DNS |
interweb_ao.cloud.vps_info |
List your servers or see one |
interweb_ao.cloud.domain |
Register a domain, or manage one you have: nameservers, transfer lock, renewal |
interweb_ao.cloud.domain_info |
List your domains, see one, or check if a name is free and its price |
interweb_ao.cloud.dns_record |
Add, change or remove a DNS record |
interweb_ao.cloud.dns_info |
Read the DNS zone of a domain |
interweb_ao.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 interweb_ao.cloud
Or from this repository:
ansible-galaxy collection build
ansible-galaxy collection install interweb_ao-cloud-1.0.0.tar.gz
Needs ansible-core 2.14 or later and Python 3.6 or later.
Quick start
export INTERWEB_API_KEY="sandbox_..." # create the key in Meu Interweb
- hosts: localhost
gather_facts: false
tasks:
- name: Point www to the server
interweb_ao.cloud.dns_record:
domain: example.co.ao
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/interweb_ao.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 Meu Interweb (https://www.meu.interweb.ao).
- 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 Meu Interweb. Documentation: https://docs.interweb.ao
Maintained by RLX Holdings.