community.general.ovh_ip_failover – Manage OVH IP failover address

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_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 Choices/Defaults Comments
application_key
string / required
The applicationKey to use
application_secret
string / required
The application secret to use
consumer_key
string / required
The consumer key to use
endpoint
string / required
The endpoint to use ( for instance ovh-eu)
name
string / required
The IP address to manage (can be a single IP like 1.1.1.1 or a block like 1.1.1.1/28 )
service
string / required
The name of the OVH service this IP address should be routed
timeout
integer
Default:
120
The timeout in seconds used to wait for a task to be completed. Default is 120 seconds.
wait_completion
boolean
    Choices:
  • no
  • yes
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
wait_task_completion
integer
Default:
0
If not 0, the module will wait for this task id to be completed. Use wait_task_completion if you want to wait for completion of a previously executed task with wait_completion=false. You can execute this module repeatedly on a list of failover IPs using wait_completion=false (see examples)

Notes

Note

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

Authors

  • Pascal HERAUD (@pascalheraud)

© 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_ip_failover_module.html