I'm using yum (RHEL). However with this approach, don't you have to update the file when the major version changes?
On Monday, January 22, 2018 at 12:33:07 PM UTC-5, Kai Stian Olstad wrote: > > On Monday, 22 January 2018 18.18.34 CET ZillaYT wrote: > > I have an Ansible task that aims to upgrade our Gitlab application. I > want > > the user to ONLY be able to upgrade 1 major release. For example, I want > to > > enable a 8.x to 9.x upgrade, but not an 8.x to 10.x upgrade. I'm aware > of > > the version_compare module, which I use, but need more than what it > does. > > If you are using apt I would suggest another way of solving this and that > is pinning in apt > > Just create a file /etc/apt/preferences.d/gitlab with the following > content > > Package: gitlab-ce > Pin: version /9.[0-9]+\.[0-9]+-/ > Pin-Priority: 1000 > > > You can read more about pinning here > https://wiki.debian.org/AptPreferences > > -- > Kai Stian Olstad > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/7abef97e-e1d4-4c28-bac4-e8343855fe09%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
