On Thursday, April 10, 2025 1:08:00 AM Eastern Daylight Time Alex wrote:
> Good morning everyone.
> 
> 
> Does the preflight playbook have a bug?
> 
> https://github.com/ceph/cephadm-ansible/blob/devel/cephadm-preflight.yml
> 
> Line 82:
> paths: "{{ ['noarch', '$basearch'] if ceph_origin == 'community' else
> ['$basearch'] }}"
> 
> The yum repo file then gets named
> ceph_stable_$basearch.
> 
> 
> Shouldn't it be basearch without the $ ?
> 

Hi Alex,
The `$basearch` there is likely trying to act as a yum (dnf) repo file 
variable. Take a look at https://developers.redhat.com/articles/2022/10/07/
whats-inside-rpm-repo-file
and search in the page for `$basearch`.  You will see it appear in various 
locations in the example file. This is a placeholder variable for dnf to 
replace with the actual base architecture of the system it is running on.

See also https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/6/
html/deployment_guide/sec-using_yum_variables#sec-Using_Yum_Variables

It's likely correct for the content of the repo file, but might be incorrect 
for the file name. I don't think simply removing the dollar sign would fix 
things.

Perhaps a different suggestion would be to remove the variable from the file 
name parameter: ceph_stable_https://github.com/ceph/cephadm-ansible/blob/
74520740e4f85ea001d7ca7ab6992ce66145bc3f/cephadm-preflight.yml#L99C24-L99C36
doing this should create mutiple repo defintions in a single repo file as per 
https://docs.ansible.com/ansible/latest/collections/ansible/builtin/
yum_repository_module.html  (search for `Add multiple repositories into the 
same file`).



_______________________________________________
ceph-users mailing list -- ceph-users@ceph.io
To unsubscribe send an email to ceph-users-le...@ceph.io

Reply via email to