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

Add always tag for php_version tasks #448

Merged
merged 1 commit into from
Sep 11, 2021

Conversation

smutel
Copy link
Contributor

@smutel smutel commented Sep 2, 2021

SUMMARY
ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

zabbix-web role

ADDITIONAL INFORMATION

When we execute a playbook using this collection with a tag, some tasks in role zabbix-web role are executed also because they have the tag called always.

However the task Include distribution and version-specific vars does not have the tag always. In this case the variable _zabbix_php_version is not defined for some OS and the error below is displayed.

msg: |-                                                                                                                                                                                                          
    The task includes an option with an undefined variable. The error was: '_zabbix_php_version' is undefined

@smutel
Copy link
Contributor Author

smutel commented Sep 10, 2021

Is-it possible to review this PR please ?

@dj-wasabi
Copy link
Contributor

Is-it possible to review this PR please ?

Yes, can you do a rebase from main? I don't understand why there is an issue that it is complaining about something that is not even part of this pr?

@smutel
Copy link
Contributor Author

smutel commented Sep 11, 2021

Rebase done.

The variable called _zabbix_php_version is only defined in specific variables files like vars/Debian-10.yml or vars/Debian-9.yml but not in var/Debian.yml.

The task Include OS-specific variables is executed all the time because the tag always is there. But the task Include distribution and version-specific vars is not executed if you execute the playbook with a specific tag. In this case the variable _zabbix_php_version is undefined.

This PR set the task Include distribution and version-specific vars with the tag always also.

@dj-wasabi dj-wasabi merged commit e1eefe4 into ansible-collections:main Sep 11, 2021
@dj-wasabi
Copy link
Contributor

Thanks! 👍

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.

2 participants