Use the rpm_key module

Ansible provides a module to install the rpm gpg key,
we might as well use it.

Change-Id: Ief2b15661a65b37f3dbaa6e06766a80f7335f100
Signed-off-by: Chuck Short <chucks@redhat.com>
This commit is contained in:
Chuck Short 2018-08-02 08:41:55 -04:00
parent 5bc76284c3
commit 0fa170367e
1 changed files with 3 additions and 2 deletions

View File

@ -10,8 +10,9 @@
# The fedoraproject CDN has problems sometimes, this will keep trying
# for up to 10 minutes before failing.
- name: Import EPEL GPG Key
shell: rpm --import {{ epel7_rpmkey }}
become: true
rpm_key:
state: present
key: "{{ epel7_rpmkey }}"
register: import_result
until: "import_result.rc==0"
retries: 10