Make Gather Playbook work in venv

Having local_action causes gather playbook to fail in a venv. We would need it
to work in a venv as we start to call Ansible programatically from browbeat.
This change helps the playbook to run in a venv.

Change-Id: I6834e83fa22edb0a5ff5551defb4a572eb50058c
This commit is contained in:
Sai Sindhur Malleni 2016-08-27 10:55:31 -04:00 committed by smalleni
parent 9bae6716d1
commit 30552a359e
2 changed files with 2 additions and 3 deletions

View File

@ -212,8 +212,7 @@ Run the gather playbook to gather metadata about how the OpenStack cloud is
currently configured. This playbook writes hardware(No. of CPUs etc),
software(OpenStack Configuration), environment(No. of controllers etc) metadata
files into the metadata directory which are transported to ElasticSearch along
with test results to provide context for the result data. Make sure you do not
run this playbook from a python virtual environment or it would fail.
with test results to provide context for the result data.
::

View File

@ -28,6 +28,6 @@
- hosts: undercloud
tasks:
- name: Dump all vars
local_action: template src=dump_facts.j2 dest={{ browbeat_path }}/metadata/machine_facts.json
template: src=dump_facts.j2 dest={{ browbeat_path }}/metadata/machine_facts.json
- name: Generate metadata jsons
shell : python {{ browbeat_path }}/lib/Metadata.py {{ browbeat_path }}/metadata