diff --git a/lib/ansible/modules/cloud/openstack/os_server.py b/lib/ansible/modules/cloud/openstack/os_server.py index 1f2ca655fb2..9e7c2979f64 100644 --- a/lib/ansible/modules/cloud/openstack/os_server.py +++ b/lib/ansible/modules/cloud/openstack/os_server.py @@ -27,7 +27,8 @@ description: options: name: description: - - Name that has to be given to the instance + - Name that has to be given to the instance. It is also possible to + specify the ID of the instance instead of its name if I(state) is I(absent). required: true image: description: @@ -381,6 +382,15 @@ EXAMPLES = ''' ifdown eth0 && ifup eth0 {% endraw %} +# Deletes an instance via its ID +- name: remove an instance + hosts: localhost + tasks: + - name: remove an instance + os_server: + name: abcdef01-2345-6789-0abc-def0123456789 + state: absent + ''' from ansible.module_utils.basic import AnsibleModule