Ansible task to check if PGP key is installed on Ubuntu

0 votes
I need an ansible playbook/task to check if the PGP is installed or not. How do I do this?

Thanks in advance!
Nov 25 in Ansible by Hannah
• 17,060 points
16 views

1 answer to this question.

0 votes

Hi @hannah, have a look at this, it might be helpful:

- hosts: all
  tasks:

  - name: Ensure the PGP key is installed
    apt_key: >
      state=present
      id=AC40B2F7
      url="http://keyserver.ubuntu.com/pks/lookup?op=get&fingerprint=on&search=0x561F9B9CAC40B2F7"
answered Nov 25 by Aria

Related Questions In Ansible

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Running ansible command on a single server when it is deployed to multiple servers

You can try the run_once attribute: Example from ...READ MORE

answered Jun 13, 2018 in Ansible by DareDev
• 6,810 points
230 views
0 votes
1 answer

Is it possible to run commands on ansible host?

If you just trying to run a ...READ MORE

answered Jan 9 in Ansible by Vijay
167 views
+13 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,380 points
245 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Is it possible to run an Ansible Playbook in python script?

Hey @Cerci, Of course its possible. You ...READ MORE

answered Jan 17 in Ansible by Nicolas
3,046 views