tripleo-ansible molecule run-local test uses ansible_connection type ssh

Bug #1864649 reported by John Fulton
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Low
Kevin Carter

Bug Description

zuul.d/playbooks/run-local.yml has 'ansible_connection: ssh' but tests/hosts.ini has 'test ansible_connection=local ansible_host=localhost'. This seems inconsistent.

As a default user trying to test my job I had to manually edit run-local.yml to get it working.

More details on how the problem presented itself to me at: http://paste.openstack.org/show/789973/

If run-local means it only runs local (I assume this to be true based on the name and the inventory you ship), then I think that's a bug. I'll send in a fix and see what the CI says. Maybe it uses SSH because of the zuul environment. I don't run SSH on my laptop so that might be why others aren't running into this. If SSH on the laptop is required then maybe we should document it.

[1]
diff --git a/zuul.d/playbooks/run-local.yml b/zuul.d/playbooks/run-local.yml
index 1b58edc..e9d36de 100644
--- a/zuul.d/playbooks/run-local.yml
+++ b/zuul.d/playbooks/run-local.yml
@@ -8,7 +8,7 @@
           projects:
             "opendev.org/openstack/tripleo-ansible":
               src_dir: "{{ tripleo_src }}"
- ansible_connection: ssh
+ ansible_connection: local

 - import_playbook: pre.yml

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-ansible (master)

Fix proposed to branch: master
Review: https://review.opendev.org/709722

Changed in tripleo:
status: Triaged → In Progress
Changed in tripleo:
assignee: John Fulton (jfulton-org) → Kevin Carter (kevin-carter)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-ansible (master)

Reviewed: https://review.opendev.org/709722
Committed: https://git.openstack.org/cgit/openstack/tripleo-ansible/commit/?id=5f0c07943eeb2c655f147be5e59b5128775ec34a
Submitter: Zuul
Branch: master

commit 5f0c07943eeb2c655f147be5e59b5128775ec34a
Author: John Fulton <email address hidden>
Date: Tue Feb 25 08:08:40 2020 -0500

    Make run-local.yml use ansible_connection local, not ssh

    If the intent of run-local.yml is to use a local ansible
    connection and not an SSH ansible connection, as implied
    by the tests/hosts.ini, then it shouldn't set a fact to
    set ansible_connection to 'ssh'. This patch changes it to
    'local'.

    Change-Id: I7494a937749a434f9bfb2e14c47b36aebdf89664
    Closes-Bug: #1864649

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-ansible 1.3.0

This issue was fixed in the openstack/tripleo-ansible 1.3.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-ansible (stable/train)

Fix proposed to branch: stable/train
Review: https://review.opendev.org/743846

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-ansible (stable/train)

Reviewed: https://review.opendev.org/743846
Committed: https://git.openstack.org/cgit/openstack/tripleo-ansible/commit/?id=8011e23fdae44d7468db465d795d002273d2eb94
Submitter: Zuul
Branch: stable/train

commit 8011e23fdae44d7468db465d795d002273d2eb94
Author: John Fulton <email address hidden>
Date: Tue Feb 25 08:08:40 2020 -0500

    Make run-local.yml use ansible_connection local, not ssh

    If the intent of run-local.yml is to use a local ansible
    connection and not an SSH ansible connection, as implied
    by the tests/hosts.ini, then it shouldn't set a fact to
    set ansible_connection to 'ssh'. This patch changes it to
    'local'.

    Change-Id: I7494a937749a434f9bfb2e14c47b36aebdf89664
    Closes-Bug: #1864649
    (cherry picked from commit 5f0c07943eeb2c655f147be5e59b5128775ec34a)

tags: added: in-stable-train
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-ansible 0.6.0

This issue was fixed in the openstack/tripleo-ansible 0.6.0 release.

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.