38023/how-do-i-add-apt-key-by-id-from-a-keyserver-ansible
I'm trying to add apt key by id from a keyserver. But I don't exactly know to do this?
Can I have a sample playbook?
Also, I know there is a module called apt_key that I can use, I just don't know to use it.
Hey @Altis, you can use the module apt_key. I've given an example, have a look and come back if you need more help
- name: Add an apt key by id from a keyserver apt_key: keyserver: keyserver.ubuntu.com id: 36A1D7869245C8950F966E92D8576A8BA88D21E9 - name: Add an Apt signing key, uses whichever key is at the URL apt_key: url: https://ftp-master.debian.org/keys/archive-key-6.0.asc state: present - name: Add an Apt signing key, will not download if present apt_key: id: 473041FA url: https://ftp-master.debian.org/keys/archive-key-6.0.asc state: present - name: Remove a Apt specific signing key, leading 0x is valid apt_key: id: 0x473041FA state: absent # Use armored file since utf-8 string is expected. Must be of "PGP PUBLIC KEY BLOCK" type. - name: Add a key from a file on the Ansible server. apt_key: data: "{{ lookup('file', 'apt.asc') }}" state: present - name: Add an Apt signing key to a specific keyring file apt_key: id: 473041FA url: https://ftp-master.debian.org/keys/archive-key-6.0.asc keyring: /etc/apt/trusted.gpg.d/debian.gpg - name: Add Apt signing key on remote server to keyring apt_key: id: 473041FA file: /tmp/apt.gpg state: present
Hey Ayaan, you could probably use this ...READ MORE
Try this: - hosts: web tasks: ...READ MORE
This can work out for you: - name: ...READ MORE
Hey @kailash use the authorized_key plugin that ...READ MORE
Hey @nmentityvibes, you seem to be using ...READ MORE
Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE
It can work if you try to put ...READ MORE
When you use docker-compose down, all the ...READ MORE
Hey @Ninja, that is possible. What you ...READ MORE
Ansible by default gathers facts about machines ...READ MORE
OR
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.