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

ansible_distribution_major_version #43

Open
okunc opened this issue Oct 6, 2017 · 2 comments
Open

ansible_distribution_major_version #43

okunc opened this issue Oct 6, 2017 · 2 comments

Comments

@okunc
Copy link

okunc commented Oct 6, 2017

Hello inkatze,

Firstly, thanks a lot for great role! I have updated from v3.0.0 to v4.0.1 and had hard times when role was skipping the opening of ports, because in tasks/configure.yml you are using:

  when: ansible_distribution_version|version_compare(7, '=') and wildfly_manage_firewall

.. but see my output of ansible all -m setup -a "filter=ansible_distribution*"

asdf | SUCCESS => {
    "ansible_facts": {
        "ansible_distribution": "RedHat", 
        "ansible_distribution_major_version": "7", 
        "ansible_distribution_release": "Maipo", 
        "ansible_distribution_version": "7.4"
    }, 
    "changed": false
}

.. so the conditional above didn't pass as 7!=7.4

I have updated tasks/configure.yml from ansible_distribution_version to ansible_distribution_major_version and it works like charm.

can you please include this? :]

thanks a lot for coop / update / wicked role and have a nice day!
okunc

@kostyrev
Copy link
Collaborator

kostyrev commented Oct 7, 2017

Why won't you just send a PR with those changes?

@okunc
Copy link
Author

okunc commented Oct 19, 2017

I will soon :]

jadbaz added a commit to jadbaz/wildfly that referenced this issue Nov 18, 2019
This fixes both:
- [inkatze#42](inkatze#43): using ansible_distribution_major_version instead of ansible_distribution_version
- [inkatze#62](inkatze#62): using is version instead of version_compare
jadbaz pushed a commit to jadbaz/wildfly that referenced this issue Mar 24, 2020
This fixes both:
- [inkatze#42](inkatze#43): using ansible_distribution_major_version instead of ansible_distribution_version
- [inkatze#62](inkatze#62): using is version instead of version_compare
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

No branches or pull requests

2 participants