Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm trying to remove apt_key I added using ansible

  • Adding the gpg key
- name: Ensure an helm signing key is present
  apt_key:
    url: https://baltocdn.com/helm/signing.asc
  become: true

and this is what I want to do

  • Deleting the gpg key
- name: Ensure helm signing key is removed
  apt_key:
    url: https://baltocdn.com/helm/signing.asc
    state: absent
  become: true
  • Output

fatal: [master]: FAILED! => {"changed": false, "msg": "key is required"}

My question is, is there an ansible module way to get the key value or only using command to extract the value from apt_key list? any suggestion, please.

It will be very helpful for me if you include a code sample as well. Thank you.

question from:https://stackoverflow.com/questions/65910162/ansible-removing-gpg-key-on-ubuntu

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
1.0k views
Welcome To Ask or Share your Answers For Others

1 Answer

Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...