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

Categories

0 votes
1.2k views
in Technique[技术] by (71.8m points)

automation - Ansible: Removing gpg key on Ubuntu?

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...