Bug 1463440 - ansible: in RHEL7.4-beta.1 ships with ansible-galaxy containing --force bug described in ansible-galaxy issue #249
Summary: ansible: in RHEL7.4-beta.1 ships with ansible-galaxy containing --force bug d...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Ansible Engine
Classification: Red Hat
Component: ansible
Version: unspecified
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Pavel Cahyna
QA Contact: Leos Pol
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-20 23:17 UTC by Henry Vindin
Modified: 2018-04-18 14:58 UTC (History)
2 users (show)

Fixed In Version: ansible-2.3.1.0-2.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-02 00:19:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2017:2366 0 normal SHIPPED_LIVE new package: ansible 2017-08-08 22:54:16 UTC

Description Henry Vindin 2017-06-20 23:17:29 UTC
Description of problem:
Ansible shipped in rhel-7-server-extras-beta-rpms ships with a version of ansible-galaxy where the --force flag does not work for updating roles.

Version-Release number of selected component (if applicable):
ansible-2.3.0.0-4.el7.noarch

How reproducible:
Every time

Steps to Reproduce:
1. Create a requirements.yml file with a a git+<url> style source. For example:
---
- name: apache
  src: git+https://github.com/geerlingguy/ansible-role-apache.git
  version: master
...
2. Run `ansible-galaxy install --roles-path ./roles --role-file requirements.yml --force -vvvv`
3. Update the master branch of the repo you specified (obviously difficult using someone elses repo, but you get my point)
4. Run the same command again (with --force)

Actual results:
Using /etc/ansible/ansible.cfg as config file
Opened /home/hvindin/.ansible_galaxy
found role {'scm': 'git', 'src': 'https://github.com/geerlingguy/ansible-role-apache.git', 'version': 'master', 'name': 'apache'} in yaml file
Installing role apache 
- apache (master) is already installed, skipping.

Expected results:
Using /etc/ansible/ansible.cfg as config file
Opened /home/hvindin/.ansible_galaxy
found role {'scm': 'git', 'src': 'https://github.com/geerlingguy/ansible-role-apache.git', 'version': 'master', 'name': 'apache'} in yaml file
Installing role apache 
- extracting apache to ./roles/apache
- apache (master) was installed successfully

Additional info:
Force seems like it should override the existing file rather than just leaving it as is.

This is fixed in:
https://github.com/ansible/ansible/pull/23391

One of the better bug reports is here:
https://github.com/ansible/galaxy-issues/issues/249

Comment 4 Pavel Cahyna 2017-06-23 11:01:55 UTC
Thank you very much for the detailed bug report. We are working on a fix and will try to release it as soon as possible.

Comment 6 errata-xmlrpc 2017-08-02 00:19:51 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2017:2366


Note You need to log in before you can comment on or make changes to this bug.