Skip to content

Ansible Local fails with latest RHEL 8 Clones #13181

@StephenPooley

Description

@StephenPooley

Debug output

Vagrant fails when trying to provision a RHEL 8 clone (e.g. AlmaLinux or RockyLinux) box using Ansible Local.

The behaviour only appears to have started happening since the weekend, that is, last week the ansible local provisioner was working fine (as it has been for many years).

The problem appears to be with the way that vagrant is installing ansible on the box using the command "dnf -y --enablerepo=epel install ansible". From what I can tell from a brief investigation is that ansible is now provided from AppStream/ansible-core rather than EPEL/ansible and the dependencies for EPEL/ansible are no longer satisfied. Note that I'm not 100% sure that this is what is actually going on, it is just what I can deduce from the outputs. I assume that something changed in these various Linux repositories over the weekend causing Ansible Local to fail?

Redacted output from running vagrant is:

vagrant up --provider vmware_desktop --provision
Bringing machine 'development' up with 'vmware_desktop' provider...
==> development: Cloning VMware VM: 'rockylinux/8'. This can take some time...
==> development: Checking if box 'rockylinux/8' version '7.0.0' is up to date...
==> development: Verifying vmnet devices are healthy...
==> development: Preparing network adapters...
==> development: Starting the VMware VM...
==> development: Waiting for the VM to receive an address...
==> development: Forwarding ports...
development: -- 22 => 2222
==> development: Waiting for machine to boot. This may take a few minutes...
development: SSH address: 127.0.0.1:2222
development: SSH username: vagrant
development: SSH auth method: private key
development:
development: Vagrant insecure key detected. Vagrant will automatically replace
development: this with a newly generated keypair for better security.
development:
development: Inserting generated public key within guest...
development: Removing insecure key from the guest if it's present...
development: Key inserted! Disconnecting and reconnecting using new SSH key...
==> development: Machine booted and ready!
==> development: Configuring network adapters within the VM...
==> development: Waiting for HGFS to become available...
==> development: Enabling and configuring shared folders...
==> development: Running provisioner: provision-using-ansible-local (ansible_local)...
development: Installing Ansible...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
dnf -y --enablerepo=epel install ansible
Stdout from the command:
Rocky Linux 8 - AppStream 2.3 MB/s | 9.1 MB 00:03
Rocky Linux 8 - BaseOS 2.5 MB/s | 2.8 MB 00:01
Rocky Linux 8 - Extras 33 kB/s | 13 kB 00:00
Extra Packages for Enterprise Linux 8 - x86_64 1.8 MB/s | 14 MB 00:07
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
Stderr from the command:
Error:
Problem: conflicting requests
nothing provides python3.9dist(ansible-core) >= 2.13.3 needed by ansible-6.3.0-2.el8.1.noarch

Expected behavior

Ansible Local should work as expected (as it has for many years).

Actual behavior

See above. Ansible fails to install.

Reproduction information

See above.

Vagrant version

v2.3.6 with certificate workaround as described #13167

Host operating system

Windows AMD64

Guest operating system

RHEL 8 Clone e.g. AlmaLinux 8 or RockyLinux 8. RHEL 8 itself not tried.

I use VMware Desktop as the hypervisor, but I think it may be independent of hypervisor since the problem relates to the Linux repos.

Steps to reproduce

  1. See above

Vagrantfile

# Copy-paste your Vagrantfile here. Remove any sensitive information such as passwords, authentication tokens, or email addresses.

Minimal Vagrant and Ansible files to reproduce...

VagrantFile...

Vagrant.configure("2") do |config|
  config.vm.box = "rockylinux/8"
  config.vm.define "development" do |development|
    development.vm.provider "vmware_desktop" do |vmware|
      vmware.allowlist_verified = true
      vmware.memory = "8192"
      vmware.cpus = 4
    end
    development.vm.provision "provision-using-ansible-local", type: "ansible_local" do |provisioner|
      provisioner.install = true
      provisioner.playbook = "playbook-provision-using-ansible-local.yml"
    end
  end
end

Ansible playbook...
(copy into file named playbook-provision-using-ansible-local.yml)

---
- hosts: development
  tasks:
  - name: Install virtual machine support
    become: yes
    ansible.builtin.package:
      name: open-vm-tools
      state: latest

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions