mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
* Fix terraform changed status detection test (#561) * Add changelog fragment * Update changelogs/fragments/563-update-terraform-status-test.yaml Co-authored-by: Felix Fontein <felix@fontein.de> Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
73be912bf7
commit
7e6bde2ce1
2 changed files with 5 additions and 1 deletions
|
@ -0,0 +1,4 @@
|
||||||
|
bugfixes:
|
||||||
|
- terraform - fix incorrectly reporting a status of unchanged when
|
||||||
|
number of resources added or destroyed are multiples of 10
|
||||||
|
(https://github.com/ansible-collections/community.general/issues/561).
|
|
@ -368,7 +368,7 @@ def main():
|
||||||
if needs_application and not module.check_mode and not state == 'planned':
|
if needs_application and not module.check_mode and not state == 'planned':
|
||||||
rc, out, err = module.run_command(command, cwd=project_path)
|
rc, out, err = module.run_command(command, cwd=project_path)
|
||||||
# checks out to decide if changes were made during execution
|
# checks out to decide if changes were made during execution
|
||||||
if '0 added, 0 changed' not in out and not state == "absent" or '0 destroyed' not in out:
|
if ' 0 added, 0 changed' not in out and not state == "absent" or ' 0 destroyed' not in out:
|
||||||
changed = True
|
changed = True
|
||||||
if rc != 0:
|
if rc != 0:
|
||||||
module.fail_json(
|
module.fail_json(
|
||||||
|
|
Loading…
Reference in a new issue