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, 2019 in Ansible by Hannah
• 18,410 points
138 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, 2019 by Aria

Related Questions In Ansible

0 votes
1 answer

Ansible playbook to check if http support for apt is installed

Hi @Hannah, this ansible task should do ...READ MORE

answered Nov 25, 2019 in Ansible by Aria
220 views
0 votes
1 answer

Ansible task to determine if a path exists and is a symlink

Hi @neha, you can write your task ...READ MORE

answered Apr 2, 2019 in Ansible by Alok
1,502 views
+1 vote
2 answers

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,850 points
656 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, 2019 in Ansible by Vijay
489 views
+15 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,450 points
673 views
+2 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, 2019 in Ansible by Nicolas
7,990 views