[RFE] set_stats - Support setting service_var from set_stats with naming convention
Hi Lucy, Using set_stats in a playbook: set_stats value: service_var__var1 1. Sets the ansible_stat state var is currently supports. 2. Create/Updates a service_var with the name of ansible_stat_var1 Let me know if you have any questions. Thanks, Tina
https://github.com/ManageIQ/manageiq-automation_engine/pull/399
New commit detected on ManageIQ/manageiq-automation_engine/master: https://github.com/ManageIQ/manageiq-automation_engine/commit/bc3d8a38842653add6575f2d639a5763bafc115a commit bc3d8a38842653add6575f2d639a5763bafc115a Author: Lucy Fu <lufu> AuthorDate: Thu Oct 24 15:06:06 2019 -0400 Commit: Lucy Fu <lufu> CommitDate: Thu Oct 24 15:06:06 2019 -0400 Update service_vars from playbook set_stats data. https://bugzilla.redhat.com/show_bug.cgi?id=1734630 lib/miq_automation_engine/engine/miq_ae_engine/miq_ae_ansible_method_base.rb | 20 + spec/miq_ae_playbook_method_spec.rb | 10 +- 2 files changed, 29 insertions(+), 1 deletion(-)
New commit detected on ManageIQ/manageiq-automation_engine/ivanchuk: https://github.com/ManageIQ/manageiq-automation_engine/commit/f678811278a43c4ee12d531eae4a68e6cc1fea71 commit f678811278a43c4ee12d531eae4a68e6cc1fea71 Author: tina <tfitzger> AuthorDate: Tue Dec 17 15:27:05 2019 +0000 Commit: Satoe Imaishi <simaishi> CommitDate: Mon Jun 22 21:04:58 2020 +0000 Merge pull request #399 from lfu/service_vars_with_set_stats Update service_vars with playbook set_stats data. (cherry picked from commit 6bcb57c032f4fd6a581abf6c0932c687585846e8) https://bugzilla.redhat.com/show_bug.cgi?id=1734630 lib/miq_automation_engine/engine/miq_ae_engine/miq_ae_ansible_method_base.rb | 20 + spec/miq_ae_playbook_method_spec.rb | 10 +- 2 files changed, 29 insertions(+), 1 deletion(-)
Requirement for this BZ: 2. set_stats - Support setting service_var from set_stats with naming convention. for example: set_stats value: service_var__var1 would set the ansible_stat state var is currently supports, but in addition would set a service_var with the same value. The service_var name would be ansible_stat_var1 The first playbook might look similar to this: - hosts: localhost tasks: - name: "Artifact data of test results to next playbook" set_stats: data: service_var__var1: "secret" It has access to a service object and updates the options hash of its root service object with :service_vars => {'ansible_stats_var1' => 'secret'} Then when the second playbook runs, it would be able to access this value of options[:service_vars]['ansible_stats_var1] from root service object.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Critical: CloudForms 5.0.7 bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2020:3358