Otherwise we'll lose the mirror configuration.
Signed-off-by: Sage Weil <sage@newdream.net>
tasks:
- pexec:
all:
+ - sudo cp /etc/containers/registries.conf /etc/containers/registries.conf.backup
- sudo dnf -y module disable container-tools
- sudo dnf -y install 'dnf-command(copr)'
- sudo dnf -y copr enable rhcontainerbot/container-selinux
- sudo curl -L -o /etc/yum.repos.d/devel:kubic:libcontainers:stable.repo https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/CentOS_8/devel:kubic:libcontainers:stable.repo
- sudo dnf remove -y podman
- sudo dnf -y install podman
+ - sudo cp /etc/containers/registries.conf.backup /etc/containers/registries.conf
tasks:
- pexec:
all:
+ - sudo cp /etc/containers/registries.conf /etc/containers/registries.conf.backup
- sudo dnf -y module disable container-tools
- sudo dnf -y install 'dnf-command(copr)'
- sudo dnf -y copr enable rhcontainerbot/container-selinux
- sudo curl -L -o /etc/yum.repos.d/devel:kubic:libcontainers:stable.repo https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/CentOS_8/devel:kubic:libcontainers:stable.repo
- sudo dnf remove -y podman
- sudo dnf -y install podman
+ - sudo cp /etc/containers/registries.conf.backup /etc/containers/registries.conf
tasks:
- pexec:
all:
+ - sudo cp /etc/containers/registries.conf /etc/containers/registries.conf.backup
- curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_18.04/Release.key | sudo apt-key add -
- echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_18.04/ /" | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
- sudo apt update
- sudo apt -y install podman
- - echo -e "[[registry]]\nlocation = 'docker.io'\n\n[[registry.mirror]]\nlocation='docker-mirror.front.sepia.ceph.com:5000'\n" | sudo tee /etc/containers/registries.conf
+ - sudo cp /etc/containers/registries.conf.backup /etc/containers/registries.conf
tasks:
- pexec:
all:
+ - sudo cp /etc/containers/registries.conf /etc/containers/registries.conf.backup
- curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_20.04/Release.key | sudo apt-key add -
- echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_20.04/ /" | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
- sudo apt update
- sudo apt -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install podman containernetworking-plugins
- - echo -e "[[registry]]\nlocation = 'docker.io'\n\n[[registry.mirror]]\nlocation='docker-mirror.front.sepia.ceph.com:5000'\n" | sudo tee /etc/containers/registries.conf
+ - sudo cp /etc/containers/registries.conf.backup /etc/containers/registries.conf
tasks:
- pexec:
all:
+ - sudo cp /etc/containers/registries.conf /etc/containers/registries.conf.backup
- curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/testing/xUbuntu_20.04/Release.key | sudo apt-key add -
- echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/testing/xUbuntu_20.04/ /" | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:testing.list
- sudo apt update
- sudo apt -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install podman containernetworking-plugins
- - echo -e "[[registry]]\nlocation = 'docker.io'\n\n[[registry.mirror]]\nlocation='docker-mirror.front.sepia.ceph.com:5000'\n" | sudo tee /etc/containers/registries.conf
+ - sudo cp /etc/containers/registries.conf.backup /etc/containers/registries.conf