Bug 1487113

Summary: Ansible is caching a module, so it cannot be overridden from updated module contained in a ansible role's library
Product: Red Hat Ansible Engine Reporter: Martin Perina <mperina>
Component: ansibleAssignee: Pavel Cahyna <pcahyna>
Status: CLOSED EOL QA Contact: qe-baseos-daemons
Severity: high Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: mperina, omachace, pkubica, tbowling
Target Milestone: ---Keywords: Extras
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1487082 Environment:
Last Closed: 2018-04-11 09:09:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1487082    

Description Martin Perina 2017-08-31 09:38:34 UTC
+++ This bug was initially created as a clone of Bug #1487082 +++

Description of problem:
Ansible caching ovirt-ansible-modules so sometimes they are not loaded from role's library

For example:
When user will use role/module for managing hosts (ovirt-hosts module or ovirt-infra role) it take the module from: /usr/lib/python2.7/site-packages/ansible/modules/cloud/ovirt/ovirt_hosts.py
after in the same playbook when user will use role with this module included in library folder (/usr/share/ansible/roles/ovirt-cluster-upgrade/library/ovirt_hosts.py), the module in library will be ignored because this module is already cached. 


Version-Release number of selected component (if applicable):
ansible-2.3.1.0-3.el7.noarch
ovirt-ansible-roles-1.0.1-1.el7ev.noarch

How reproducible:
Always

Steps to Reproduce:
1. run infra role and host upgrade role in same playbook

Actual results:
affected all modules in library folders (user can run ansible module before role)

Comment 1 Martin Perina 2017-08-31 09:42:15 UTC
As seen from attached github issues, the fix for that issue from reverted from Ansible source codes, because it broke tests. But even when it was reverted, the original issue is closed as fixed.

Currently this is affecting Ansible roles, which we are shipping within RHV, but it's common issue and can be affecting all Red Hat products which contains Ansible roles with updated modules inside

Comment 3 Martin Perina 2018-02-12 10:08:09 UTC
Created upstream https://github.com/ansible/ansible/issues/36028 to track it

Comment 4 Pavel Cahyna 2018-04-11 09:09:52 UTC
ansible was deprecated in RHEL Extras, see bz1533106 and https://access.redhat.com/articles/3359651. Please track it upstream and/or in the Ansible Engine bugzilla product.