I am building a kickstart file to serve multiple versions of fedora. I am getting stuck on importing rpm gpg keys. In my ks file I have paths to my local repos which work fine.

url --url="ftp://172.16.0.5/fedora/releases/$releasever/$basearch/"
repo --name="updates" --baseurl=ftp://172.16.0.5/fedora/updates/$releasever/$basearch/

In the %post section I try to import keys. I do not want to hard code the release version because I use this file for multiple versions. This does not work, $releasever is not recognized in %post like it was for the repos. Is there a way of doing this? --Thanks

rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-$releasever-fedora