#8156 ansible: clean up old ansible_distribution_major_version conditionals
Closed: Fixed 4 years ago by kevin. Opened 4 years ago by kevin.

We have a number of playbooks that use:

when: ansible_distribution_major_version|int <=> someversion

We should do the following:

  • If they are 7 or 8 we mean rhel here, so we should add a 'and ansible_distribution is 'RedHat''

  • if they are 29, 30, 31, 32, etc mean Fedora and should add a 'and ansible_distribution is 'Fedora'"

  • If they are anything else, we should remove the task most likely since it never runs now on any of our supported hosts.

We are in Beta freeze right now, but patches can be made ready and we can apply them after the freeze, or (since I think this is pretty safe) we could just get a exception and apply them all in freeze.


What's the correct repo to use for this ?
We have one on infrastructure.fedoraproject.org and one on pagure.io. The latter has a note FUTURE_LOCATION, but seems to have patches that are not on infrastructure.fedoraproject.org although i.fp.o gets more commits

The one on pagure.io was just a convenience clone for when we worked on the repo
during the hackfest in Ireland. I still push to it every now and then, but it is
most often lagging behind.

The source of truth is the one in batcave01.

Ok, I have a patch for this, where do you want me to put it ?
It is currently in my $HOME/ansible directory on batcave01 in the ansible_version_conditionals branch.
It certainly needs a careful review as I'm not familiar with all the hosts that are set up with these scripts and have no idea if some of the checks even make sense as some machines might be Fedora or RHEL only.
There are a couple of FIXME notes in the patch with questions where I was unsure or thought something was missing

Well, you could attach it here? Or post it to the mailing list (or a pointer to it if it's too big).

i can try and look it over soon. Thanks!!!!

Commited! Thanks for all the work on it...

Metadata Update from @kevin:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

4 years ago

Login to comment on this ticket.

Metadata