Update os_server docs when removing an instance (#41963)

When removing an instance via its ID, it is not clearly explained that one should use the `name` parameter.

Also a simple example is provided.

+label: docsite_pr
This commit is contained in:
Pierre Gaxatte 2018-08-24 16:42:25 +02:00 committed by ansibot
parent 507d6e241e
commit 3122860f22

View file

@ -27,7 +27,8 @@ description:
options: options:
name: name:
description: 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 required: true
image: image:
description: description:
@ -381,6 +382,15 @@ EXAMPLES = '''
ifdown eth0 && ifup eth0 ifdown eth0 && ifup eth0
{% endraw %} {% 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 from ansible.module_utils.basic import AnsibleModule