Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix rpm_key absent. #31045

Merged
merged 1 commit into from
Oct 5, 2017
Merged

Conversation

esuarezsantana
Copy link
Contributor

SUMMARY

When trying to remove a gpg key with the rpm_key module, if keyid is 8 charactes long, drop_key function cuts everything issuing an error: "package gpg-pubkey- is not installed"

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

rpm_key

ANSIBLE VERSION
ansible 2.4.0.0
  config file = /home/eduardo/.ansible.cfg
  configured module search path = [u'/home/eduardo/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /home/eduardo/.local/lib/python2.7/site-packages/ansible
  executable location = /home/eduardo/.local/bin/ansible
  python version = 2.7.13 (default, Mar  6 2017, 16:32:24) [GCC 5.4.0]
ADDITIONAL INFORMATION

Create an ansible centos machine and try, install a key and try to remove it with rpm_key module.

  • Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
  config.vm.box = "centos/7"
  config.vm.provision "ansible" do |ansible|
    ansible.verbose = "v"
    ansible.playbook = "rpm_key-absent.yml"
  end
end
  • rpm_key-absent.yml
---
- hosts: all
  tasks:
    - rpm_key:
        key: /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
    - rpm_key:
        key: f4a80eb5
        state: absent

When keyid is 8 charactes long, drop_key function cuts everything
issuing an error: "package gpg-pubkey- is not installed"
@ansibot
Copy link
Contributor

ansibot commented Sep 28, 2017

@ansibot ansibot added affects_2.5 This issue/PR affects Ansible v2.5 bugfix_pull_request core_review In order to be merged, this PR must follow the core review workflow. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Sep 28, 2017
@samdoran
Copy link
Contributor

cc @mkrizek

@samdoran samdoran removed the needs_triage Needs a first human triage before being processed. label Sep 28, 2017
@mkrizek
Copy link
Contributor

mkrizek commented Oct 3, 2017

cc @schwatvogel

@schwatvogel
Copy link
Contributor

Ouch, sorry for leaving that.
Looks ok to me

@mkrizek mkrizek merged commit 4337b7a into ansible:devel Oct 5, 2017
@mkrizek mkrizek added this to Nominated in 2.4.x Blocker List Oct 5, 2017
@abadger
Copy link
Contributor

abadger commented Oct 5, 2017

cherry-picked for 2.4.1rc1

@abadger abadger moved this from Nominated to Done in 2.4.x Blocker List Oct 5, 2017
abadger pushed a commit that referenced this pull request Oct 5, 2017
When keyid is 8 charactes long, drop_key function cuts everything
issuing an error: "package gpg-pubkey- is not installed"
(cherry picked from commit 4337b7a)
@ansibot ansibot added bug This issue/PR relates to a bug. and removed bugfix_pull_request labels Mar 6, 2018
@ansible ansible locked and limited conversation to collaborators Apr 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.5 This issue/PR affects Ansible v2.5 bug This issue/PR relates to a bug. core_review In order to be merged, this PR must follow the core review workflow. module This issue/PR relates to a module. support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
No open projects
2.4.x Blocker List
Done in 2.4.1
Development

Successfully merging this pull request may close these issues.

None yet

6 participants