community.general.ovh_monthly_billing (0.1.1) — module

Manage OVH monthly billing

Authors: Francois Lallart (@fraff)

preview | supported by community

Install collection

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


Add to requirements.yml

  collections:
    - name: community.general
      version: 0.1.1

Description

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


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# basic usage, using auth from /etc/ovh.conf
  - ovh_monthly_billing:
       project_id: 0c727a20aa144485b70c44dee9123b46
       instance_id: 8fa89ad2-8f08-4220-9fa4-9695ea23e948
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# a bit more more complex
  # get openstack cloud ID and instance ID, OVH use them in its API
  - os_server_info:
      cloud: myProjectName
      region_name: myRegionName
      server: myServerName
    # force run even in check_mode
    check_mode: no
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
  # use theses IDs
  - 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