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...
This photo is to show (use both yum_repository: gpgkey: and rpm_key: module together)
@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
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
Yes !
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.