Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes a bug when run crushes, because zabbix_repo tries register as v… #1320

Merged
merged 1 commit into from
Jul 4, 2024

Conversation

XaTTa6bl4
Copy link
Contributor

fixes a bug when run crushes, because zabbix_repo tries register as variable, but at the same time it is a role name

TASK [community.zabbix.zabbix_repo : Debian | Update apt cache if repo was added] *************************************************************************************************
fatal: [test]: FAILED! => {"msg": "The conditional check 'zabbix_repo is changed' failed. The error was: The 'changed' test expects a dictionary\n\nThe error appears to be in '~/test/ansible/collections/ansible_collections/community/zabbix/roles/zabbix_repo/tasks/Debian.yml': line 96, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: \"Debian | Update apt cache if repo was added\"\n  ^ here\n"}

…ariable, but at the same time it is a role name
@BGmot
Copy link
Collaborator

BGmot commented Jul 4, 2024

@pyrodie18 how come we don't catch this type of errors in our tests??

@BGmot
Copy link
Collaborator

BGmot commented Jul 4, 2024

@XaTTa6bl4 please provide Ansible, this collection and Debian versions. I am really worried that we did not catch this error in tests.
Also it would be nice an issue to be created for this error and this PR to reference this issue.

@XaTTa6bl4
Copy link
Contributor Author

@XaTTa6bl4 please provide Ansible, this collection and Debian versions.

Ansible installed on MacOS:

$ ansible --version
ansible [core 2.17.1]
  configured module search path = ['~/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /opt/homebrew/Cellar/ansible/10.1.0/libexec/lib/python3.12/site-packages/ansible
  ansible collection location = ~/ansible/collections
  executable location = /opt/homebrew/bin/ansible
  python version = 3.12.4 (main, Jun  6 2024, 18:26:44) [Clang 15.0.0 (clang-1500.3.9.4)] (/opt/homebrew/Cellar/ansible/10.1.0/libexec/bin/python)
  jinja version = 3.1.4
  libyaml = True

test host with Ubuntu:

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 22.04.4 LTS
Release:	22.04
Codename:	jammy

@pyrodie18
Copy link
Collaborator

Um....you got me there. Taking a look at it now.

@pyrodie18
Copy link
Collaborator

Just looked, its running find on the runners. No error.

https://github.com/ansible-collections/community.zabbix/actions/runs/9771836712/job/27043650739

  TASK [community.zabbix.zabbix_repo : Debian | Configuring the weight for APT] ***
  skipping: [zabbix-agent-ubuntu2404]
  
  TASK [community.zabbix.zabbix_repo : Debian | Update apt cache if repo was added] ***
  changed: [zabbix-agent-ubuntu2404]
  
  TASK [zabbix_agent : Install the correct repository] ***************************
  included: /home/runner/work/community.zabbix/community.zabbix/roles/zabbix_agent/tasks/Debian.yml for zabbix-agent-ubuntu2404

@pyrodie18
Copy link
Collaborator

Would ask to add a change fragment but want to get this out ASAP. Going to pull it in right now and will add the change fragment when I release the updated version.

@pyrodie18 pyrodie18 merged commit b1599cf into ansible-collections:main Jul 4, 2024
342 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants