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

Fixed ansible distribution check template error #63

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jadbaz
Copy link

@jadbaz jadbaz commented Nov 18, 2019

This fixes both:

  • #42: using ansible_distribution_major_version instead of ansible_distribution_version
  • #62: using is version instead of version_compare to satisfy Ansible 2.9 breaking change

@jadbaz
Copy link
Author

jadbaz commented Nov 19, 2019

Prior to this pull request, ansible_distribution_version was never 7. It was always 7.X so the failing part of the tests never ran.
Now that we changed it ansible_distribution_major_version it matches 7 on EL 7 and the tests actually run.
The reason this failed is another thing

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
@Mageti
Copy link
Contributor

Mageti commented Apr 22, 2020

When could this PR be merged, please ?

@jadbaz
Copy link
Author

jadbaz commented Apr 22, 2020

@Mageti I couldn't wait so I forked it
You can use my galaxy role meanwhile
jadbaz.wildfly:v4.0.2
(Make sure to use v4.0.2 tag)

@kostyrev
Copy link
Collaborator

@Mageti when author will be changed back

@jadbaz
Copy link
Author

jadbaz commented Apr 23, 2020

@kostyrev, sorry I changed the author in order to create a galaxy role.
However, I only changed the author one month ago while this PR has been sitting here since November.
So there must be another issue
I think the issue was with the test cases but now that I force pushed my repo I can't see the travis builds anymore

@kostyrev
Copy link
Collaborator

kostyrev commented Apr 23, 2020

tests are fine
they fail with very precise error

--> Executing Ansible Lint on /home/travis/build/inkatze/inkatze.wildfly/molecule/default/playbook.yml...
    [ANSIBLE0002] Trailing whitespace
    /home/travis/build/inkatze/inkatze.wildfly/meta/main.yml:4
      author: jadbaz 
    
    [ANSIBLE0002] Trailing whitespace
    /home/travis/build/inkatze/inkatze.wildfly/tasks/configure.yml:94
      when: ansible_distribution_major_version is version('7', '=') and wildfly_manage_firewall 

Exactly for this reason we use pre-commit.
You can run make lint to setup it up to avoid those kind of problems in the future.

@jadbaz
Copy link
Author

jadbaz commented Apr 24, 2020

I'm already using my repo for my forked galaxy role
Can someone else fork and submit another pull request?
It's really just 1 line change
And I can close this one

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.

4 participants