Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing the injected repositories during the cloud-init phase once we finish that phase #1218

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions backend_modules/libvirt/host/user_data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ runcmd:
%{ else }
- "dnf -y install salt-minion avahi nss-mdns qemu-guest-agent"
%{ endif }
- "rm -f /etc/yum.repos.d/tools_pool_repo.repo"
- "rm -f /etc/yum.repos.d/epel.repo"
%{ endif }

%{ if image == "centos8o" }
Expand Down Expand Up @@ -95,6 +97,10 @@ runcmd:
%{ else }
- "dnf -y install salt-minion avahi nss-mdns qemu-guest-agent"
%{ endif }
- "rm -f /etc/yum.repos.d/tools_pool_repo.repo"
- "rm -f /etc/yum.repos.d/epel.repo"
- "rm -f /etc/yum.repos.d/CentOS-Base_backup.repo"
- "rm -f /etc/yum.repos.d/CentOS-Appstream_backup.repo"
%{ endif }

%{ if image == "centos9o" }
Expand Down Expand Up @@ -136,6 +142,10 @@ runcmd:
%{ else }
- "dnf -y install salt-minion avahi nss-mdns qemu-guest-agent"
%{ endif }
- "rm -f /etc/yum.repos.d/tools_pool_repo.repo"
- "rm -f /etc/yum.repos.d/epel.repo"
- "rm -f /etc/yum.repos.d/CentOS-Base_backup.repo"
- "rm -f /etc/yum.repos.d/CentOS-Appstream_backup.repo"
%{ endif }

%{ if image == "opensuse155o" || image == "opensuse156o" || image == "opensuse155-ci-pro"}
Expand Down Expand Up @@ -176,6 +186,7 @@ runcmd:
%{ else }
- "zypper -n in avahi nss-mdns qemu-guest-agent"
%{ endif }
- "zypper removerepo os_pool_repo"
%{ endif }

%{ if image == "sles15sp2o" }
Expand Down Expand Up @@ -203,6 +214,7 @@ runcmd:
%{ else }
- "zypper -n in avahi nss-mdns qemu-guest-agent"
%{ endif }
- "zypper removerepo os_pool_repo"
# WORKAROUND: cloud-init in SLES 15 SP2 does not take care of the following
- "systemctl start 'qemu-ga@virtio\\x2dports-org.qemu.guest_agent.0'"
%{ endif }
Expand All @@ -229,6 +241,7 @@ runcmd:
%{ endif }
# WORKAROUND: cloud-init in SLES 15 SP3 does not take care of the following
- "systemctl start 'qemu-ga@virtio\\x2dports-org.qemu.guest_agent.0'"
- "zypper removerepo os_pool_repo"
%{ endif }

%{ if image == "sles15sp4o" }
Expand All @@ -253,6 +266,7 @@ runcmd:
%{ endif }
# WORKAROUND: cloud-init in SLES 15 SP4 does not take care of the following
- "systemctl start 'qemu-ga@virtio\\x2dports-org.qemu.guest_agent.0'"
- "zypper removerepo os_pool_repo"
%{ endif }

%{ if image == "sles15sp5o" }
Expand All @@ -278,6 +292,7 @@ runcmd:
# WORKAROUND: cloud-init in SLES 15 SP5 does not take care of the following
# TODO: Check!
- "systemctl start 'qemu-ga@virtio\\x2dports-org.qemu.guest_agent.0'"
- "zypper removerepo os_pool_repo"
%{ endif }

%{ if image == "sles15sp6o" }
Expand All @@ -303,6 +318,7 @@ runcmd:
# WORKAROUND: cloud-init in SLES 15 SP6 does not take care of the following
# TODO: Check!
- "systemctl start 'qemu-ga@virtio\\x2dports-org.qemu.guest_agent.0'"
- "zypper removerepo os_pool_repo"
%{ endif }

%{ if image == "slemicro55o" }
Expand Down Expand Up @@ -468,6 +484,7 @@ runcmd:
- "apt-get -yq update"
- "apt-get -yq install salt-minion avahi-daemon qemu-guest-agent"
%{ endif }
- "rm -f /etc/apt/sources.list.d/tools_pool_repo.list"
- systemctl start qemu-guest-agent
%{ endif }

Expand Down Expand Up @@ -513,6 +530,7 @@ runcmd:
- "apt-get -yq update"
- "apt-get -yq install salt-minion avahi-daemon qemu-guest-agent"
%{ endif }
- "rm -f /etc/apt/sources.list.d/tools_pool_repo.list"
- systemctl start qemu-guest-agent
%{ endif }

Expand Down Expand Up @@ -563,6 +581,7 @@ runcmd:
- "apt-get -yq update"
- "DEBIAN_FRONTEND=noninteractive apt-get -yq install salt-minion avahi-daemon qemu-guest-agent"
%{ endif }
- "rm -f /etc/apt/sources.list.d/tools_pool_repo.list"
- systemctl start qemu-guest-agent
%{ endif } # end Ubuntu 24.04

Expand Down Expand Up @@ -610,6 +629,7 @@ runcmd:
- "DEBIAN_FRONTEND=noninteractive apt-get -yq update"
- "DEBIAN_FRONTEND=noninteractive apt-get -yq install salt-minion avahi-daemon qemu-guest-agent"
%{ endif }
- "rm -f /etc/apt/sources.list.d/tools_pool_repo.list"
- systemctl start qemu-guest-agent
%{ endif }

Expand Down Expand Up @@ -659,6 +679,7 @@ runcmd:
- "DEBIAN_FRONTEND=noninteractive apt-get -yq update"
- "DEBIAN_FRONTEND=noninteractive apt-get -yq install salt-minion avahi-daemon qemu-guest-agent gnupg python3-apt"
%{ endif }
- "rm -f /etc/apt/sources.list.d/tools_pool_repo.list"
- systemctl start qemu-guest-agent
%{ endif }

Expand Down Expand Up @@ -687,6 +708,8 @@ runcmd:
%{ else }
- "dnf -y install salt-minion avahi nss-mdns qemu-guest-agent"
%{ endif }
- "rm -f /etc/yum.repos.d/tools_pool_repo.repo"
- "rm -f /etc/yum.repos.d/epel.repo"
%{ endif }

%{ if image == "almalinux8o" }
Expand All @@ -711,6 +734,8 @@ runcmd:
%{ else }
- "dnf -y install avahi nss-mdns qemu-guest-agent salt-minion"
%{ endif }
- "rm -f /etc/yum.repos.d/tools_pool_repo.repo"
- "rm -f /etc/yum.repos.d/epel.repo"
%{ endif }

%{ if image == "almalinux9o" }
Expand Down Expand Up @@ -738,6 +763,8 @@ runcmd:
%{ else }
- "dnf -y install avahi nss-mdns qemu-guest-agent salt-minion dbus-tools"
%{ endif }
- "rm -f /etc/yum.repos.d/tools_pool_repo.repo"
- "rm -f /etc/yum.repos.d/epel.repo"
%{ endif }

%{ if image == "libertylinux9o" }
Expand All @@ -761,6 +788,8 @@ runcmd:
- echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
- systemctl restart sshd
- dnf -y install venv-salt-minion
- "rm -f /etc/yum.repos.d/tools_pool_repo.repo"
- "rm -f /etc/yum.repos.d/epel.repo"

%{ endif }

Expand All @@ -786,6 +815,8 @@ runcmd:
%{ else }
- "dnf -y install avahi nss-mdns salt-minion dbus-tools"
%{ endif }
- "rm -f /etc/yum.repos.d/tools_pool_repo.repo"
- "rm -f /etc/yum.repos.d/epel.repo"
%{ endif }

%{ if image == "rocky9o" }
Expand Down Expand Up @@ -813,6 +844,8 @@ runcmd:
%{ else }
- "dnf -y install avahi nss-mdns salt-minion dbus-tools"
%{ endif }
- "rm -f /etc/yum.repos.d/tools_pool_repo.repo"
- "rm -f /etc/yum.repos.d/epel.repo"
%{ endif }

%{ if image == "oraclelinux8o" }
Expand All @@ -837,8 +870,11 @@ runcmd:
%{ else }
- "dnf -y install avahi nss-mdns qemu-guest-agent salt-minion"
%{ endif }
- "rm -f /etc/yum.repos.d/tools_pool_repo.repo"
- "rm -f /etc/yum.repos.d/epel.repo"
%{ endif }


%{ if image == "oraclelinux9o" }
yum_repos:
# repo for salt
Expand All @@ -864,6 +900,8 @@ runcmd:
%{ else }
- "dnf -y install salt-minion avahi nss-mdns qemu-guest-agent dbus-tools tar"
%{ endif }
- "rm -f /etc/yum.repos.d/tools_pool_repo.repo"
- "rm -f /etc/yum.repos.d/epel.repo"
%{ endif }

%{ if image == "opensuse155armo" || image == "opensuse156armo" }
Expand Down
Loading