From abcff17b829338b2892796717b220a780afef61e Mon Sep 17 00:00:00 2001 From: agopi Date: Tue, 20 Nov 2018 17:32:39 -0500 Subject: [PATCH] Browbeat to use fs001 of stockpile and minor bugfix in prescribe 1. Browbeat shall make use of the fs001 which is the targetted version of stockpile, thus it won't run all roles against all hosts. 2. Also updated the bug where node_name wasn't added to dictionary when prescribe first hits data that was gathered from outside config file. Change-Id: Ieac2c090713b307b4971aee3fd4d5b24f14b9fc9 --- ansible/gather/stockpile.yml | 18 ++++++++++++++++-- browbeat/prescribe.py | 1 + doc/source/contributing.rst | 3 ++- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/ansible/gather/stockpile.yml b/ansible/gather/stockpile.yml index 705a6c4cf..d410270b6 100644 --- a/ansible/gather/stockpile.yml +++ b/ansible/gather/stockpile.yml @@ -2,11 +2,24 @@ - hosts: stockpile tasks: - - name: setting fact for metadata folder + - name: setting facts needed set_fact: md_output_path: "{{ browbeat_path }}/metadata/machine_facts.json" + stockpile_user: "{{ browbeat_user }}" -- import_playbook: stockpile/stockpile.yml +- hosts: overcloud + tasks: + - name: setting facts + set_fact: + overcloud_user: "{{ host_remote_user }}" + +- hosts: undercloud + tasks: + - name: setting facts + set_fact: + undercloud_user: "{{ local_remote_user }}" + +- import_playbook: stockpile/config/featureset001.yml vars: stockpile_output_path: "{{ md_output_path }}" @@ -14,3 +27,4 @@ tasks: - name: run prescribe command: python {{ browbeat_path }}/browbeat/prescribe.py {{ browbeat_path }}/metadata + diff --git a/browbeat/prescribe.py b/browbeat/prescribe.py index 17a137485..518a9f9bb 100644 --- a/browbeat/prescribe.py +++ b/browbeat/prescribe.py @@ -110,6 +110,7 @@ class Metadata(object): key_name = service[1] if service_name not in software_dict.keys(): software_dict[service_name] = {} + software_dict[service_name]['node_name'] = node if key_name not in software_dict[service_name].keys(): software_dict[service_name][key_name] = {} for obj, value in output.iteritems(): diff --git a/doc/source/contributing.rst b/doc/source/contributing.rst index c92f59663..1888ec403 100644 --- a/doc/source/contributing.rst +++ b/doc/source/contributing.rst @@ -146,6 +146,7 @@ See the README.rst in the ci-scripts folder for more details on the structure of Contributing to stockpile ------------------------- -We currently use `stockpile `_ +We currently use `featureset001 `_ of +`stockpile `_ to gather config. Please follow `instructions `_ to contribute to stockpile.