# Installing Passenger fails: "repomd.xml signature could not be verified for passenger" but works interactively

**URL:** <https://forum.ansible.com/t/installing-passenger-fails-repomd-xml-signature-could-not-be-verified-for-passenger-but-works-interactively/21048>\
**Category:** Ansible Project\
**Tags:** fedora\
**Created:** [April 3, 2016, 12:18pm UTC](https://forum.ansible.com/t/installing-passenger-fails-repomd-xml-signature-could-not-be-verified-for-passenger-but-works-interactively/21048 "2016-04-03T12:18:00Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![TJG](https://avatars.discourse-cdn.com/v4/letter/t/ecccb3/32.png) [@TJG](https://forum.ansible.com/u/TJG)\
**Post date:** [April 3, 2016, 12:18pm UTC](https://forum.ansible.com/t/installing-passenger-fails-repomd-xml-signature-could-not-be-verified-for-passenger-but-works-interactively/21048/1 "2016-04-03T12:18:00Z")

</div>

Hi all;

I’m pretty new to Ansible, but have generally made good progress with a playbook to set up a (vagrant) CentOS 7 box. One point of grief is my translation of Phusion’s instructions for installing Passenger, from [here](https://www.phusionpassenger.com/library/walkthroughs/deploy/ruby/ownserver/apache/oss/el7/install_passenger.html).

Running the following playbook ( **as root** ) fails with “[Errno -1] repomd.xml signature could not be verified for passenger”  
yet works perfectly when done interactively.

Any ideas what the difference is?

Thanks,  
Tim

`

- name: Passenger | Add Phusion’s EL7 YUM repository  
shell: sudo curl --fail -sSLo /etc/yum.repos.d/passenger.repo [https://oss-binaries.phusionpassenger.com/yum/definitions/el-passenger.repo](https://oss-binaries.phusionpassenger.com/yum/definitions/el-passenger.repo)

- name: Passenger | Set root as owner of passenger.repo and allow only root to read and write passenger.repo  
file: path=/etc/yum.repos.d/passenger.repo owner=root mode=600

- name: Passenger | Install mod\_passenger  
yum: name={{ item }} state=present enablerepo=passenger  
with\_items:

- mod\_passenger  
`

Results in:

`

^@failed: [localhost] (item=[u’mod\_passenger’]) =\> {“failed”: true, “invocation”: {“module\_args”: {“conf\_file”: null, “disable\_gpg\_check”: false, “disablerepo”: null, “enablerepo”: “passenger”, “exclude”: null, “install\_repoquery”: true, “list”: null, “name”: [“mod\_passenger”], “state”: “present”, “update\_cache”: false, “validate\_certs”: true}, “module\_name”: “yum”}, “item”: [“mod\_passenger”], “msg”: “Failure talking to yum: failure: repodata/repomd.xml from passenger: [Errno 256] No more mirrors to try.\n[https://oss-binaries.phusionpassenger.com/yum/passenger/el/7/x86\_64/repodata/repomd.xml:](https://oss-binaries.phusionpassenger.com/yum/passenger/el/7/x86_64/repodata/repomd.xml:) [Errno -1] repomd.xml signature could not be verified for passenger”}  
`

Transcript of interactive installation:

`  
[vagrant@test-httpd ~]$ sudo yum install -y mod\_passenger  
Loaded plugins: fastestmirror  
base | 3.6 kB 00:00:00  
epel/x86\_64/metalink | 11 kB 00:00:00  
epel | 4.3 kB 00:00:00  
extras | 3.4 kB 00:00:00  
passenger/7/x86\_64/signature | 836 B 00:00:00  
Retrieving key from [https://packagecloud.io/gpg.key](https://packagecloud.io/gpg.key)  
Importing GPG key 0xD59097AB:  
Userid : “packagecloud ops (production key) [ops@packagecloud.io](mailto:ops@packagecloud.io)”  
Fingerprint: 418a 7f2f b0e1 e6e7 eabf 6fe8 c2e7 3424 d590 97ab  
passenger/7/x86\_64/signature | 1.0 kB 00:00:00 !!!  
passenger-source/7/signature  
…  
…  
Total 337 kB/s | 6.4 MB 00:00:19  
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7  
Importing GPG key 0x352C64E5:  
Userid : “Fedora EPEL (7) [epel@fedoraproject.org](mailto:epel@fedoraproject.org)”  
Fingerprint: 91e9 7d7c 4a5e 96f1 7f3e 888f 6a2f aea2 352c 64e5  
Package : epel-release-7-5.noarch (@extras)  
Running transaction check  
Running transaction test  
Transaction test succeeded  
Running transaction  
Updating : selinux-policy-3.13.1-60.el7\_2.3.noarch 1/8  
Installing : 1:rubygem-rack-1.6.4-2.el7.noarch 2/8  
Installing : rubygem-rake-0.9.6-25.el7\_1.noarch 3/8  
Installing : passenger-5.0.26-8.el7.x86\_64 4/8  
Installing : mod\_passenger-5.0.26-8.el7.x86\_64 5/8  
…

Installed:  
mod\_passenger.x86\_64 0:5.0.26-8.el7  
Dependency Installed:  
passenger.x86\_64 0:5.0.26-8.el7 rubygem-rack.noarch 1:1.6.4-2.el7 rubygem-rake.noarch 0:0.9.6-25.el7\_1

Dependency Updated:  
selinux-policy.noarch 0:3.13.1-60.el7\_2.3 selinux-policy-targeted.noarch 0:3.13.1-60.el7\_2.3

Complete!  
[vagrant@test-httpd ~]$

`

---

<div class="post-metadata">

**Author:** ![Kacper\_Patro](https://avatars.discourse-cdn.com/v4/letter/k/919ad9/32.png) [@Kacper\_Patro](https://forum.ansible.com/u/Kacper_Patro)\
**Post date:** [May 8, 2016, 7:37pm UTC](https://forum.ansible.com/t/installing-passenger-fails-repomd-xml-signature-could-not-be-verified-for-passenger-but-works-interactively/21048/2 "2016-05-08T19:37:21Z")

</div>

Hi Tim,

I had similar issue with VirtualBox repo. In my case, removing line **repo\_gpgcheck=1** from repo file (i.e. `el-passenger.repo) helped.`

`Best Regards,`  
`Kacper`

W dniu niedziela, 3 kwietnia 2016 14:18:00 UTC+2 użytkownik TJG napisał:

---

<div class="post-metadata">

**Author:** ![Tim\_Griffin](https://avatars.discourse-cdn.com/v4/letter/t/a4c791/32.png) [@Tim\_Griffin](https://forum.ansible.com/u/Tim_Griffin)\
**Post date:** [May 9, 2016, 3:17pm UTC](https://forum.ansible.com/t/installing-passenger-fails-repomd-xml-signature-could-not-be-verified-for-passenger-but-works-interactively/21048/3 "2016-05-09T15:17:09Z")

</div>

Thanks, Kacper.

I’ll give that a shot!  
Tim

---

<div class="post-metadata">

**Author:** ![Johannes\_Kastl](https://avatars.discourse-cdn.com/v4/letter/j/bbe5ce/32.png) [@Johannes\_Kastl](https://forum.ansible.com/u/Johannes_Kastl)\
**Post date:** [May 9, 2016, 3:24pm UTC](https://forum.ansible.com/t/installing-passenger-fails-repomd-xml-signature-could-not-be-verified-for-passenger-but-works-interactively/21048/4 "2016-05-09T15:24:22Z")

</div>

DONT! You lose all security provided by gpg signatures of the  
packages. (Sorry for the yelling... ;-))

I would rather add the rpm-key with the corresponding module, the link  
is in your output:

[https://packagecloud.io/gpg.key](https://packagecloud.io/gpg.key)

Johannes

---

<div class="post-metadata">

**Author:** ![Tim\_Griffin](https://avatars.discourse-cdn.com/v4/letter/t/a4c791/32.png) [@Tim\_Griffin](https://forum.ansible.com/u/Tim_Griffin)\
**Post date:** [May 9, 2016, 3:29pm UTC](https://forum.ansible.com/t/installing-passenger-fails-repomd-xml-signature-could-not-be-verified-for-passenger-but-works-interactively/21048/5 "2016-05-09T15:29:30Z")

</div>

Ah, okay. Good point, Johannes.

And, on RHEL, turning of the GPG check wouldn’t be a good plan anyways!

Tim

---

<div class="post-metadata">

**Author:** ![Johannes\_Kastl](https://avatars.discourse-cdn.com/v4/letter/j/bbe5ce/32.png) [@Johannes\_Kastl](https://forum.ansible.com/u/Johannes_Kastl)\
**Post date:** [May 9, 2016, 7:22pm UTC](https://forum.ansible.com/t/installing-passenger-fails-repomd-xml-signature-could-not-be-verified-for-passenger-but-works-interactively/21048/6 "2016-05-09T19:22:59Z")

</div>

On CentOS-machines I use this snippet to install the epel-release  
package and import the rpm-key:

- name: CentOS - install epel-release  
&nbsp;&nbsp;yum: name=epel-release state=latest  
&nbsp;&nbsp;when: ansible\_os\_family == "RedHat"

- name: CentOS - install epel-release Key  
&nbsp;&nbsp;rpm\_key: key="/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-{{  
ansible\_distribution\_major\_version }}" state=present  
&nbsp;&nbsp;when: ansible\_os\_family == "RedHat"

Johannes

---

<div class="post-metadata">

**Author:** ![Tim\_Griffin](https://avatars.discourse-cdn.com/v4/letter/t/a4c791/32.png) [@Tim\_Griffin](https://forum.ansible.com/u/Tim_Griffin)\
**Post date:** [May 9, 2016, 8:21pm UTC](https://forum.ansible.com/t/installing-passenger-fails-repomd-xml-signature-could-not-be-verified-for-passenger-but-works-interactively/21048/7 "2016-05-09T20:21:16Z")

</div>

Johannes… I appreciate you sharing your snippet of code. That should save me some time!

Tim

---

<div class="post-metadata">

**Author:** ![Jubz\_Madagascar](https://avatars.discourse-cdn.com/v4/letter/j/ecccb3/32.png) [@Jubz\_Madagascar](https://forum.ansible.com/u/Jubz_Madagascar)\
**Post date:** [December 17, 2016, 4:23pm UTC](https://forum.ansible.com/t/installing-passenger-fails-repomd-xml-signature-could-not-be-verified-for-passenger-but-works-interactively/21048/8 "2016-12-17T16:23:55Z")

</div>

This is the snippet that worked for me, in case anyone experiences the same problem:

_**# Extra Packages for Enterprise Linux (EPEL)**_  
_**- name: Extra Packages for Enterprise Linux (EPEL)**_  
_ **yum: name=epel-release state=latest** _  
_ **- name: EPEL repository key** _  
_ **rpm\_key:** _  
_ **key: “/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-{{ ansible\_distribution\_major\_version }}”** _  
_ **state: present** _
