Open mykelalvis opened 3 years ago
Workarounds that have worked for me:
amazon-linux-extras
ansible_local
against Amazon Linux2. Installing ansible on the host system and then using the ansible
provisioner is an option if you don't want ansible installed on the guest.Vagrant.require_version ">= 1.8 "
Vagrant.configure("2") do |config|
config.vm.box = "bento/amazonlinux-2"
config.vm.provider "virtualbox" do |vb|
vb.name = "test"
vb.gui = false
vb.memory = "2048"
vb.cpus = 1
vb.check_guest_additions = false
end
# Easy update
config.vm.provision "shell", inline: <<-SHELL
sudo yum -y update
sudo amazon-linux-extras install ansible2
SHELL
config.vm.provision "ansible_local" do |ansible|
ansible.become = true
ansible.galaxy_role_file = "ansible_requirements.yml"
ansible.galaxy_roles_path = "/etc/ansible/roles"
ansible.galaxy_command = "sudo ansible-galaxy install --role-file=%{role_file} --roles-path=%{roles_path} --force"
ansible.playbook = "playbook.yml"
ansible.verbose = false
end
end
Vagrant version
Host operating system
Guest operating system
config.vm.box = "bento/amazonlinux-2"
Vagrantfile
playbook.yml
Debug output
link to a GitHub Gist containing the complete debug output
Expected behavior
Expected
ansible_local
to install Ansible and then execute playbookActual behavior
Vagrant appeared to 404 trying to install EPEL
Steps to reproduce
Vagrantfile
andjenkins.yml
into local directoryvagrant up
References