community.general.ovh_ip_failover module – Manage OVH IP failover address
Note
This module is part of the community.general collection (version 10.7.5).
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.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: community.general.ovh_ip_failover.
Synopsis
- Manage OVH (French European hosting provider) IP Failover Address. For now, this module can only be used to move an IP failover (or failover block) between services. 
Requirements
The below requirements are needed on the host that executes this module.
- ovh >= 0.4.8 
Parameters
| Parameter | Comments | 
|---|---|
| The applicationKey to use. | |
| The application secret to use. | |
| The consumer key to use. | |
| The endpoint to use (for instance  | |
| The IP address to manage (can be a single IP like  | |
| The name of the OVH service this IP address should be routed. | |
| The timeout in seconds used to wait for a task to be completed. Default is 120 seconds. Default:  | |
| If true, the module will wait for the IP address to be moved. If false, exit without waiting. The taskId will be returned in module output. Choices: 
 | |
| If not 0, the module will wait for this task ID to be completed. Use  Default:  | 
Attributes
| Attribute | Support | Description | 
|---|---|---|
| Support: full | Can run in  | |
| Support: none | Will return details on what has changed (or possibly needs changing in  | 
Notes
Note
- Uses the Python OVH API https://github.com/ovh/python-ovh. You have to create an application (a key and secret) with a consumer key as described into https://docs.ovh.com/gb/en/customer/first-steps-with-ovh-api/. 
Examples
# Route an IP address 1.1.1.1 to the service ns666.ovh.net
- community.general.ovh_ip_failover:
    name: 1.1.1.1
    service: ns666.ovh.net
    endpoint: ovh-eu
    application_key: yourkey
    application_secret: yoursecret
    consumer_key: yourconsumerkey
- community.general.ovh_ip_failover:
    name: 1.1.1.1
    service: ns666.ovh.net
    endpoint: ovh-eu
    wait_completion: false
    application_key: yourkey
    application_secret: yoursecret
    consumer_key: yourconsumerkey
  register: moved
- community.general.ovh_ip_failover:
    name: 1.1.1.1
    service: ns666.ovh.net
    endpoint: ovh-eu
    wait_task_completion: "{{moved.taskId}}"
    application_key: yourkey
    application_secret: yoursecret
    consumer_key: yourconsumerkey
