Install package for point release

33 views
Skip to first unread message

Kevin Csuka

unread,
Dec 29, 2016, 5:05:24 AM12/29/16
to Ansible Project

Actual package name in the repo is package-2.6.12-3.el7.x86_64.

The goal is to install a package with Ansible, to:

  • * Ensure the point release is installed, such as package-2.2
  • * Doesn't install major releases, such as package-3.0
  • * Updates for minor releases, such as package-2.6.13-4

The repo can update packages from time to time, but I don't know when.

My thought was to install a package like this;

- name: Install package
  yum:
    name: package-2.6
    state: present

But the task fails, because package-2.6 is not in the repo. Whereas simply package works, but it not future proof.

How do I achieve this?

Kevin Csuka

unread,
Dec 30, 2016, 2:51:05 AM12/30/16
to Ansible Project
Any epic guru's?

Kevin Csuka

unread,
Jan 3, 2017, 3:05:22 AM1/3/17
to Ansible Project
Someone?

Kai Stian Olstad

unread,
Jan 3, 2017, 5:44:39 AM1/3/17
to ansible...@googlegroups.com
On 29.12.2016 11:05, Kevin Csuka wrote:
> Actual package name in the repo is package-2.6.12-3.el7.x86_64.
>
> The goal is to install a package with Ansible, to:
>
> - * Ensure the point release is installed, such as package-2.2
> - * Doesn't install major releases, such as package-3.0
> - * Updates for minor releases, such as package-2.6.13-4
>
> The repo can update packages from time to time, but I don't know when.
>
> My thought was to install a package like this;
>
> - name: Install package
> yum:
> name: package-2.6
> state: present
>
> But the task fails, because package-2.6 is not in the repo. Whereas
> simply
> package works, but it not future proof.
>
> How do I achieve this?

Since yum need the complete version number "yum update package-2.6.13"
you'll need to provide that in Ansible as well.

So to make this work you would need to run a script or a creative one
liner in command or the shell module.

--
Kai Stian Olstad

Kevin Csuka

unread,
Jan 4, 2017, 7:18:37 AM1/4/17
to Ansible Project, ansible-pr...@olstad.com
Dang, thought you could come up with a solution :)
You're an expert.

But thanks for the reply. I'll find my way and create something creative.
Reply all
Reply to author
Forward
0 new messages