Note
This plugin is part of the community.digitalocean collection.
To install it use: ansible-galaxy collection install community.digitalocean
.
To use it in a playbook, specify: community.digitalocean.digital_ocean_floating_ip
.
The below requirements are needed on the host that executes this module.
Parameter | Choices/Defaults | Comments |
---|---|---|
droplet_id string | The Droplet that the Floating IP has been assigned to. | |
ip string | Public IP address of the Floating IP. Used to remove an IP | |
oauth_token string / required | DigitalOcean OAuth token. | |
region string | The region that the Floating IP is reserved to. | |
state string |
| Indicate desired state of the target. |
Note
- name: "Create a Floating IP in region lon1" community.digitalocean.digital_ocean_floating_ip: state: present region: lon1 - name: "Create a Floating IP assigned to Droplet ID 123456" community.digitalocean.digital_ocean_floating_ip: state: present droplet_id: 123456 - name: "Delete a Floating IP with ip 1.2.3.4" community.digitalocean.digital_ocean_floating_ip: state: absent ip: "1.2.3.4"
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
data dictionary | success and no resource constraint | a DigitalOcean Floating IP resource Sample: {'action': {'completed_at': None, 'id': 68212728, 'region': {'available': True, 'features': ['private_networking', 'backups', 'ipv6', 'metadata'], 'name': 'New York 3', 'sizes': ['512mb', '1gb', '2gb', '4gb', '8gb', '16gb', '32gb', '48gb', '64gb'], 'slug': 'nyc3'}, 'region_slug': 'nyc3', 'resource_id': 758603823, 'resource_type': 'floating_ip', 'started_at': '2015-10-15T17:45:44Z', 'status': 'in-progress', 'type': 'assign_ip'}} |
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.10/collections/community/digitalocean/digital_ocean_floating_ip_module.html