community.general.ovh_monthly_billing (8.5.0) — module

Manage OVH monthly billing

| "added in version" 0.2.0 of community.general"

Authors: Francois Lallart (@fraff)

Install collection

Install with ansible-galaxy collection install community.general:==8.5.0


Add to requirements.yml

  collections:
    - name: community.general
      version: 8.5.0

Description

Enable monthly billing on OVH cloud instances (be aware OVH does not allow to disable it).


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Basic usage, using auth from /etc/ovh.conf
  community.general.ovh_monthly_billing:
    project_id: 0c727a20aa144485b70c44dee9123b46
    instance_id: 8fa89ad2-8f08-4220-9fa4-9695ea23e948
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Get openstack cloud ID and instance ID, OVH use them in its API
- name: Get openstack cloud ID and instance ID
  os_server_info:
    cloud: myProjectName
    region_name: myRegionName
    server: myServerName
  register: openstack_servers
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Use IDs
  community.general.ovh_monthly_billing:
    project_id: "{{ openstack_servers.0.tenant_id }}"
    instance_id: "{{ openstack_servers.0.id }}"
    application_key: yourkey
    application_secret: yoursecret
    consumer_key: yourconsumerkey

Inputs

    
endpoint:
    description:
    - The endpoint to use (for instance ovh-eu)
    type: str

project_id:
    description:
    - ID of the project, get it with U(https://api.ovh.com/console/#/cloud/project#GET)
    required: true
    type: str

instance_id:
    description:
    - ID of the instance, get it with U(https://api.ovh.com/console/#/cloud/project/%7BserviceName%7D/instance#GET)
    required: true
    type: str

consumer_key:
    description:
    - The consumer key to use
    type: str

application_key:
    description:
    - The applicationKey to use
    type: str

application_secret:
    description:
    - The application secret to use
    type: str