From 71952a0aad9e1371559148b2b723ec83f5dbf106 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Grimal?= <24417484+agrimal@users.noreply.github.com> Date: Sun, 5 Aug 2018 23:49:11 +0200 Subject: [PATCH] Fix bug #32437 (#38166) --- lib/ansible/modules/cloud/lxd/lxd_container.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/ansible/modules/cloud/lxd/lxd_container.py b/lib/ansible/modules/cloud/lxd/lxd_container.py index 12d1bc8965..f38a3cfaa5 100644 --- a/lib/ansible/modules/cloud/lxd/lxd_container.py +++ b/lib/ansible/modules/cloud/lxd/lxd_container.py @@ -457,9 +457,13 @@ class LXDContainerManagement(object): return False if key == 'config': old_configs = dict((k, v) for k, v in self.old_container_json['metadata'][key].items() if not k.startswith('volatile.')) + for k, v in self.config['config'].items(): + if old_configs[k] != v: + return True + return False else: old_configs = self.old_container_json['metadata'][key] - return self.config[key] != old_configs + return self.config[key] != old_configs def _needs_to_apply_container_configs(self): return (