diff --git a/lib/ansible/modules/extras/cloud/lxd/lxd_container.py b/lib/ansible/modules/extras/cloud/lxd/lxd_container.py index 65a0ff6a37..294fdefa22 100644 --- a/lib/ansible/modules/extras/cloud/lxd/lxd_container.py +++ b/lib/ansible/modules/extras/cloud/lxd/lxd_container.py @@ -444,7 +444,7 @@ class LxdContainerManagement(object): if key not in self.config: return False if key == 'config': - old_configs = dict((k, v) for k, v in self.old_container_json['metadata'][key].items() if k.startswith('volatile.')) + old_configs = dict((k, v) for k, v in self.old_container_json['metadata'][key].items() if not k.startswith('volatile.')) else: old_configs = self.old_container_json['metadata'][key] return self.config[key] != old_configs