From 3122860f229c64c4246680119221a114818cb419 Mon Sep 17 00:00:00 2001 From: Pierre Gaxatte <30696904+pgaxatte@users.noreply.github.com> Date: Fri, 24 Aug 2018 16:42:25 +0200 Subject: [PATCH] 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 --- lib/ansible/modules/cloud/openstack/os_server.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/ansible/modules/cloud/openstack/os_server.py b/lib/ansible/modules/cloud/openstack/os_server.py index 1f2ca655fb..9e7c2979f6 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