skip to Main Content

I try to install ansible-core, which version is 2.12. I am installing this as per the documentation.

$ yum install epel-release
$ yum install ansible

But, the system keeps installing version 2.9.27.

It really makes me annoying because I’ve already had experience of installing ansible-core before and it worked. Anyway, I tried to reinstall ansible on the other CentOS 8 servers with the same installation process as I did before.

Please let me know how to install latest version or specific version of Ansible.

3

Answers


  1. try

    sudo yum install ansible-2.12.1

    as in

    sudo yum install <package_name>-<version_info>

    hope this will work

    Login or Signup to reply.
  2. You can check the newest version of packages on this site: https://pkgs.org/search/?q=ansible.

    At this point, the newest ansible package version is 2.9.27. So, you need to wait until they release a new version or consider compiling this package from the source yourself.

    Login or Signup to reply.
  3. But, the system keeps installing version 2.9.27.

    You’re installing Ansible from a repository. This means someone has packaged a certain version of Ansible.

    You’re OS is EL 8-like, the note on the website describes:

    Since Ansible 2.10 for RHEL is not available at this time, continue to use Ansible 2.9.
    

    how to install latest version or specific version of ansible

    When installing python packages, you should not use the package manager of the system, but rather Pip. So, as part of the answer which is already been given in the comments, you should install Ansible via pip.

    $ dnf install epel-release -y ; dnf install python3-pip -y
    $ python3 -m pip install ansible
    

    You can update to the latest version with:

    $ python3 -m pip install ansible --upgrade
    

    Install a specific version with:

    $ python3 -m pip install ansible==5.0.1
    

    Ensure to install python modules the same way you install Ansible.

    $ python3 -m pip install yamllint
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search