diff --git a/Vagrantfile b/Vagrantfile index 79d8cca..87e0c7d 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -12,8 +12,8 @@ MEMORY = ENV.fetch("VM_SIZE", "8192").to_i # Every Vagrant development environment requires a box. You can search for # boxes at https://vagrantcloud.com/search. -# BOX = ENV.fetch("VM_BOX", "generic/centos8") -BOX = ENV.fetch("VM_BOX", "generic/ubuntu2004") +BOX = ENV.fetch("VM_BOX", "generic/centos8") +# BOX = ENV.fetch("VM_BOX", "generic/ubuntu2004") # Machine host name HOSTNAME = "tobiko" diff --git a/playbooks/vagrant/provision.yaml b/playbooks/vagrant/provision.yaml index 4c5bd67..cd01592 100644 --- a/playbooks/vagrant/provision.yaml +++ b/playbooks/vagrant/provision.yaml @@ -24,6 +24,21 @@ when: - ansible_os_family == 'Debian' + - become: true + when: + - ansible_distribution == "CentOS" + - ansible_distribution_major_version == "8" + block: + - name: Switch from CentOS Linux repos to Centos Stream repos + command: dnf -y swap centos-linux-repos centos-stream-repos + args: + warn: false + + - name: Switch packages from CentOS Linux to to Centos Stream + command: dnf -y distro-sync + args: + warn: false + roles: - devstack-tobiko-deploy - devstack-tobiko-run-tests