On this page
community.general.ovh_monthly_billing – Manage OVH monthly billing
Note
This plugin is part of the community.general collection (version 3.8.1).
You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install community.general.
To use it in a playbook, specify: community.general.ovh_monthly_billing.
New in version 0.2.0: of community.general
Synopsis
- Enable monthly billing on OVH cloud intances (be aware OVH does not allow to disable it).
 
Requirements
The below requirements are needed on the host that executes this module.
- ovh
 
Parameters
| Parameter | Choices/Defaults | Comments | 
|---|---|---|
| application_key
        
        string
         | 
      
        
        The applicationKey to use
         | 
     |
| application_secret
        
        string
         | 
      
        
        The application secret to use
         | 
     |
| consumer_key
        
        string
         | 
      
        
        The consumer key to use
         | 
     |
| endpoint
        
        string
         | 
      
        
        The endpoint to use (for instance ovh-eu)
         | 
     |
| instance_id
        
        string / required
         | 
      
        
        ID of the instance, get it with https://api.ovh.com/console/#/cloud/project/%7BserviceName%7D/instance#GET
         | 
     |
| project_id
        
        string / required
         | 
      
        
        ID of the project, get it with https://api.ovh.com/console/#/cloud/project#GET
         | 
     
Examples
- name: Basic usage, using auth from /etc/ovh.conf
  community.general.ovh_monthly_billing:
    project_id: 0c727a20aa144485b70c44dee9123b46
    instance_id: 8fa89ad2-8f08-4220-9fa4-9695ea23e948
# 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
- 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
  Authors
- Francois Lallart (@fraff)
 
© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
 https://docs.ansible.com/ansible/latest/collections/community/general/ovh_monthly_billing_module.html