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,570 points
890 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
782 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
6,881 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 14, 2018 in Ansible by DareDev
• 6,890 points
2,170 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 10, 2019 in Ansible by Vijay
1,248 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 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
3,520 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
15,062 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP