set_stats - Support object update using playbook set_stats naming convention
Hi Lucy, Here's the ticket for your PR: https://github.com/ManageIQ/manageiq-automation_engine/pull/381 Thanks, Tina
New commit detected on ManageIQ/manageiq-automation_engine/master: https://github.com/ManageIQ/manageiq-automation_engine/commit/1d6d1522988e9f1c6f3bcdf750f9fe152bd93184 commit 1d6d1522988e9f1c6f3bcdf750f9fe152bd93184 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 object based on ansible set_stats data. https://bugzilla.redhat.com/show_bug.cgi?id=1734629 lib/miq_automation_engine/engine/miq_ae_engine/miq_ae_ansible_method_base.rb | 30 +- spec/miq_ae_playbook_method_spec.rb | 20 +- 2 files changed, 43 insertions(+), 7 deletions(-)
New commit detected on ManageIQ/manageiq-automation_engine/ivanchuk: https://github.com/ManageIQ/manageiq-automation_engine/commit/11451b8823b868975a0e79d804d26b72faf89e6a commit 11451b8823b868975a0e79d804d26b72faf89e6a Author: tina <tfitzger> AuthorDate: Tue Nov 26 16:56:11 2019 +0000 Commit: Satoe Imaishi <simaishi> CommitDate: Mon Jun 22 18:36:42 2020 +0000 Merge pull request #381 from lfu/ansible_stats_update_object Update object based on ansible set_stats data. (cherry picked from commit f53215a9fb128430516ea0538e2c724ced56f709) https://bugzilla.redhat.com/show_bug.cgi?id=1734629 lib/miq_automation_engine/engine/miq_ae_engine/miq_ae_ansible_method_base.rb | 30 +- spec/miq_ae_playbook_method_spec.rb | 20 +- 2 files changed, 43 insertions(+), 7 deletions(-)
Requirement from this BZ: 1. set_stats - Support object update using playbook set_stats naming convention: for example: miq_provision__options_ipaddr would look in the current/root object for the miq_provision object, and if found, would update/add options hash ipaddr key with the value specified. The first playbook might look similar to this: - hosts: localhost tasks: - name: "Artifact data of test results to next playbook" set_stats: data: service_template_provision_task__status: "Warn" service_template_provision_task__options__config_info__active: true It has access to a service_template_provision_task object and updates its status and options[:config_info][:active] value. Then when the second playbook runs, it would be able to access these updated values from service_template_provision_task 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