Retry an Embedded Ansible playbook method in a state machine


#1

I’m trying to initiate a playbook method retry using the manageiq-automate role set_retry variable

It appears to be setting ae_result = retry in the automate workspace just fine, however after it invokes the playbook method again I get the following error:

State= running raised exception: <undefined method `reload’ for nil:NilClass>

I have mapped out the workflow and it roughly looks like this:

-> on_entry
----> ae_state_retries: 0
----> ae_result: ok
-> invoking playbook method
----> passing in correct options/extra_vars
----> Calling playbook.run
----> Setting State Machine Auto Retry Interval: 60
----> Processed State=[playbook1] with Result=[async_launch]
-> playbook runs
----> log available under /var/lib/awx/job_status
----> sets retry using manageiq-automate
----> successful completion
-> on_entry
----> ae_state_retries: 1
----> ae_result: ok
-> invoking playbook method
----> no playbook run
----> Processed State=[playbook1] with Result=[retry]
-> on_exit
----> ae_state_retries: 2
----> ae_result: retry
-> on_entry
----> ae_state_retries: 2
----> ae_result: ok
-> invoking playbook method
----> no playbook run
----> ERROR => State= running raised exception: <undefined method `reload’ for nil:NilClass>
-> on_error
----> ae_state_retries: 2
----> ae_result: error
-> task exits on error

I am running CFME 5.9.3 and the state machine is being executed via a catalog item

Any advice or past experience with this is more than welcome

Cheers,
Matt


#2

Appears to be a bug

https://bugzilla.redhat.com/show_bug.cgi?id=1625047 for those playing along at home