cancel
Showing results for 
Search instead for 
Did you mean: 
spurs
Flight Engineer
Flight Engineer
  • 448 Views

gpgkey when creating a repo

Hi guys,

when I create a repo, should I use gpgkey: option in the yum_repository module even though I use rpm_key module to specify the key? some of them use only yum_repository: with gpgkey: , some of them use both yum_repository: gpgkey: and rpm_key: module together, but in RH294, it only showed rpm_key: and there's no gpgkey: option in yum_repository module. I'm a bit confused now...

spurs_0-1712703635754.png

This photo is to show (use both yum_repository: gpgkey: and rpm_key: module together)

 

Labels (1)
3 Replies
Chetan_Tiwary_
Moderator
Moderator
  • 375 Views

@spurs I guess no need to specify separately the gpgkey in the yum_repository module when you already import the same using the rpm_key module.

But you can if you want - for clarity and sanity!

https://docs.ansible.com/ansible/latest/collections/ansible/builtin/yum_repository_module.html 

https://docs.ansible.com/ansible/latest/collections/ansible/builtin/rpm_key_module.html 

spurs
Flight Engineer
Flight Engineer
  • 360 Views

Alright, thanks! 

Then, this example should be good? (please ignore other options in yum_repository module)

yum_repository:

  gpgcheck: yes

 

rpm_key:

  key: ~~

  state: present

 

 

Chetan_Tiwary_
Moderator
Moderator
  • 341 Views

Yes !

0 Kudos
Join the discussion
You must log in to join this conversation.