[CentOS] How do I confirm importing repo key without user intervention?

Sun Mar 12 16:01:31 UTC 2017
Leon Fauster <leonfauster at googlemail.com>

Am 12.03.2017 um 16:42 schrieb Yuri Kanivetsky <yuri.kanivetsky at gmail.com>:
> 
> Sorry for asking it again. I just thought I asked the question the
> wrong way. Too much unnecessary details. And therefore, got no
> replies.
> 
> I'm configuring a server from, say, a script (automatically). I need
> it to be done without user saying, "Yes, it's okay to import the key."
> 
> I was told to run the following command:
> 
>    yum makecache -y --disablerepo=* --enablerepo=passenger
> 
> Can you confirm if this is okay? Any better ways? Thanks in advance.


what about importing the key beforehand

rpm --import keyfile

--
LF