Ansible collection for Interweb Mozambique: automate VPS servers, domains and DNS records with idempotent modules https://docs.interweb.co.mz
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-28 09:42:37 +02:00
.github Add CI workflow and Dependabot 2026-11-28 09:15:53 +02:00
examples Initial release (1.0.0) 2026-11-27 22:29:25 +02:00
meta Initial release (1.0.0) 2026-11-27 22:29:25 +02:00
plugins Initial release (1.0.0) 2026-11-27 22:29:25 +02:00
.gitignore Initial release (1.0.0) 2026-11-27 22:29:25 +02:00
CHANGELOG.md Initial release (1.0.0) 2026-11-27 22:29:25 +02:00
galaxy.yml Initial release (1.0.0) 2026-11-27 22:29:25 +02:00
LICENSE Initial release (1.0.0) 2026-11-27 22:29:25 +02:00
README.md Add badges and improve description 2026-11-28 09:42:37 +02:00
README.pt.md Add badges and improve description 2026-11-28 09:42:37 +02:00
repo.json Add badges and improve description 2026-11-28 09:42:37 +02:00

Ansible Collection for Interweb Mozambique

CI Release License: MIT

Manage your Interweb Mozambique VPS servers, domains and DNS records with Ansible. The collection uses only the public Interweb Mozambique API (https://docs.interweb.co.mz) and the Python standard library: nothing else to install.

Modules

Module What for
interweb_mz.cloud.vps Buy a VPS with credit, or manage one you have: start, stop, restart, time zone, reverse DNS
interweb_mz.cloud.vps_info List your servers or see one
interweb_mz.cloud.domain Register a domain, or manage one you have: nameservers, transfer lock, renewal
interweb_mz.cloud.domain_info List your domains, see one, or check if a name is free and its price
interweb_mz.cloud.dns_record Add, change or remove a DNS record
interweb_mz.cloud.dns_info Read the DNS zone of a domain
interweb_mz.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_mz.cloud

Or from this repository:

ansible-galaxy collection build
ansible-galaxy collection install interweb_mz-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_mz.cloud.dns_record:
        domain: example.co.mz
        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_mz.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 use server_id from then on.
  • domain registers only when the domain is not in the account yet. With register: false it never buys.
  • The API cannot cancel services or delete domains. Cancel in Meu Interweb (https://www.meu.interweb.co.mz).
  • The key needs these permissions: catalog:read; vps:read and vps:write; domains:read and domains:write; dns:read and dns:write; billing:purchase to buy.
  • Errors show the API code and the correlation_id, to give to support. 429 and 5xx answers are retried.

License

MIT. See LICENSE.


Create your API key in the API Center of Meu Interweb. Documentation: https://docs.interweb.co.mz

Maintained by RLX Holdings.