From cc3bb0a04334cf2cdb7fc3f76f12f0b3f475984d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Moser?= Date: Fri, 25 Aug 2017 16:47:14 +0200 Subject: [PATCH] cloudstack: cs_instance: warn for changes not applicable to running VMs. (#28664) --- lib/ansible/modules/cloud/cloudstack/cs_instance.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/ansible/modules/cloud/cloudstack/cs_instance.py b/lib/ansible/modules/cloud/cloudstack/cs_instance.py index cd9a9ad7483..b656ccbfe54 100644 --- a/lib/ansible/modules/cloud/cloudstack/cs_instance.py +++ b/lib/ansible/modules/cloud/cloudstack/cs_instance.py @@ -829,6 +829,9 @@ class AnsibleCloudStackInstance(AnsibleCloudStack): # Start VM again if it was running before if instance_state == 'running' and start_vm: instance = self.start_instance() + else: + self.module.warn("Changes won't be applied to running instances. " + + "Use force=true to allow the instance %s to be stopped/started." % instance['name']) return instance