From b3a5b6a816efc56fd83e7d3af71e88698d97e25e Mon Sep 17 00:00:00 2001 From: Federico Ressi Date: Thu, 20 May 2021 13:16:30 +0200 Subject: [PATCH] Switch from CentOS Linux to CentOS Stream on Vagrantfile Change-Id: I085df382a8d2544dd01e51e38b2ef612fad23bd4 --- Vagrantfile | 4 ++-- playbooks/vagrant/provision.yaml | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) 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