Ansible is unable to be executed

Bug #1857001 reported by Alexander Rubtsov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Committed
High
Denis Meltsaykin

Bug Description

MOS: 9.2+ (code snapshot at 2019-11-18)

=== Steps to reproduce ===
1) Deploy MOS 9.2 environment

2) Update Ansible up to the following version:
[root@fuel ~]# rpm -qa | grep ansible
ansible-2.1.1.0-1.el7~mos3.noarch

3) Execute some Ansible command. E.g:
[root@fuel ~]# ansible --version

=== Actual result ===
The executed command has failed:
ERROR! Unexpected Exception: cannot import name CLI
the full traceback was:

Traceback (most recent call last):
  File "/usr/bin/ansible", line 81, in <module>
    from ansible.cli.adhoc import AdHocCLI as mycli
  File "/usr/lib/python2.7/site-packages/ansible/cli/__init__.py", line 37, in <module>
    from ansible.vars.unsafe_proxy import AnsibleUnsafeBytes
  File "/usr/lib/python2.7/site-packages/ansible/vars/__init__.py", line 36, in <module>
    from ansible.cli import CLI
ImportError: cannot import name CLI

=== Expected result ===
The executed command has performed the appropriate action.

Changed in fuel:
importance: Undecided → High
Changed in fuel:
milestone: 9.x-updates → 9.2-mu-15
status: New → Confirmed
Changed in fuel:
assignee: MOS Maintenance (mos-maintenance) → Valeriy Saharov (vsakharov)
status: Confirmed → In Progress
Changed in fuel:
assignee: Valeriy Saharov (vsakharov) → Denis Meltsaykin (dmeltsaykin)
Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix proposed to packages/centos7/ansible (9.0)

Fix proposed to branch: 9.0
Change author: Denis V. Meltsaykin <email address hidden>
Review: https://review.fuel-infra.org/41547

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Related fix proposed to openstack/mos-updates (9.0/mitaka)

Related fix proposed to branch: 9.0/mitaka
Change author: Denis V. Meltsaykin <email address hidden>
Review: https://review.fuel-infra.org/41548

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Related fix merged to openstack/mos-updates (9.0/mitaka)

Reviewed: https://review.fuel-infra.org/41548
Submitter: Pkgs Jenkins <email address hidden>
Branch: 9.0/mitaka

Commit: 3aec6e8d606ce09f5ee07d37a6cb1bac17d0b42c
Author: Denis V. Meltsaykin <email address hidden>
Date: Thu Dec 19 14:39:32 2019

Fix compatibillity issue

Older environments that use ansible 2.1 may encounter an issue with
playbooks since the "path" used in the "lineinfile" module is only
introduced in ansible version 2.3. This patch changes "path" to
"dest" which is a compatible way of doing this.

Change-Id: I8fd63b8aa3826609eccd9286483b0fc73a8aa9a6
Related-Bug: #1857001

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix merged to packages/centos7/ansible (9.0)

Reviewed: https://review.fuel-infra.org/41547
Submitter: Pkgs Jenkins <email address hidden>
Branch: 9.0

Commit: fbe61ce3daeab4785bd7ee75ea24e2ef52804617
Author: Denis V. Meltsaykin <email address hidden>
Date: Thu Dec 19 14:00:35 2019

Fix the circular dependency issue

This fixes an issue with circular dependecy between ansible.vars
and ansible.cli introduced when fixing #1842402.

Change-Id: I7132fed61cf68776a436732b40e64636bf8555b3
Closes-Bug: #1857001

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.