[17:27] <arita> I'm new to cloud-init and am looking at adding the repo for docker to my base installs. I don't quite see how I add the baseurl for docker. it says to specify where the repodata directory is, and I don't get any errors when I do so in /var/log/cloud-init.log, but it's not adding the repository.
[17:28] <arita> I'm using yum_add_repo, baseurl: https://download.docker.com/linux/centos/9/x86_64/stable/ so unsure if it's because my url is wrong or other reasons.
[20:43] <holmanb> arita: could you share a paste of the userdata you're using?
[20:50] <arita> https://dpaste.com/897P9NU5R
[20:51] <arita> it's simple and just sitting in /etc/cloud/cloud.cfg.d as one of the first loading configs
[20:51] <arita> this is using alma-linux's cloud image.
[21:04] <waldi> arita: where did you find this example? esp with the missing space after "baseurl:"
[21:05] <arita> err, that's my own. I fixed the missing space earlier, but must have went into an old image.
[22:57] <holmanb> arita: did you check whether /etc/yum.repos.d/docker-ce.repo was installed and what the contents are?
[22:59] <holmanb> arita: I assume you'll need to install the docker key, unless your distro/base image already provides it?
[23:00] <holmanb> arita: did you try checking whether dnf is aware of the new repo after cloud-init ran?
[23:01] <holmanb> arita: `dnf repolist` or similar?
[23:06] <arita> holmanb: dnf repolist doesn't show the docker-ce repo. I'll see if throwing the key into the cfg helps.
[23:06] <holmanb> what about the file?
[23:06] <holmanb> does it exist?
[23:10] <arita> nope
[23:12] <holmanb> if a .repo isn't getting installed, then I don't the key is your only problem
[23:13] <holmanb> cc_yum_add_repo runs once per instance. Are you launching a new instance each test? or running cloud-init clean?
[23:14] <holmanb> A paste of the log would help.
[23:27] <arita> I had been running cloud-init clean mostly, but have tried it on fresh as well. https://dpaste.com/HSYWXWY64