parent
bc3db437e8
commit
41b88cc279
2 changed files with 9 additions and 1 deletions
4
changelogs/fragments/lxd-idempotent-config.yaml
Normal file
4
changelogs/fragments/lxd-idempotent-config.yaml
Normal file
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
bugfixes:
|
||||
- Fix lxd module to be idempotent when the given configuration for the lxd
|
||||
container has not changed (https://github.com/ansible/ansible/pull/38166)
|
|
@ -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 (
|
||||
|
|
Loading…
Reference in a new issue