Skip to content

Commit

Permalink
Fix usage of compare_list_reduced variable (#721)
Browse files Browse the repository at this point in the history
Co-authored-by: Marges, RSY (Rick) <rick.marges@achmea.nl>
Co-authored-by: Sean Sullivan <ssulliva@redhat.com>
  • Loading branch information
3 people authored Nov 19, 2023
1 parent 7aec995 commit 0609b69
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion plugins/lookup/controller_object_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ def run(self, terms, variables=None, **kwargs):
item.update({"state": "absent"})
# Combine Lists
if self.get_option("with_present"):
for item in compare_list_reduced:
for item in compare_list:
item.update({"state": "present"})
compare_list.extend(difference)
# Return Compare list with difference attached
Expand Down
8 changes: 4 additions & 4 deletions tests/configs/differential_items.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,20 @@ differential_items:
organization: Default
scm_type: git
scm_url: https://github.com/ansible/tower-example.git
# state: present
state: present
- description: ansible-examples
name: Test Inventory source project
organization: Default
scm_type: git
scm_url: https://github.com/ansible/ansible-examples.git
# state: present
state: present
- credential: gitlab-personal-access-token for satqe_auto_droid
description: ansible-examples
name: Test Inventory source project with credential
organization: Default
scm_type: git
scm_url: https://github.com/ansible/ansible-examples.git
# state: present
state: present
wait: false
- description: Test Project 1
name: Test Project
Expand All @@ -67,7 +67,7 @@ differential_items:
scm_clean: true
scm_type: git
scm_url: https://github.com/ansible/tower-example.git
# state: present
state: present
- name: Demo Project
organization: Default
state: absent
Expand Down

0 comments on commit 0609b69

Please sign in to comment.