cd9c30c1a1
While evaluating the conditional statement (when: (('Controller' in group_names) and ('plugin=collectd' not in item.stdout) and sqlalchemy_collectd_plugin)), if sqlalchemy_collectd_plugin is set to false, the register db_connections does not store any output as the step (Get mysql string) is skipped. This causes the error (dict object has no attribute stdout). This patch fixes the issue by placing the condition check ('plugin=collectd' not in item.stdout) at the end of the when statement, and due to lazy evaluation of conditional statements in Ansible, the condition check is skipped if sqlalchemy_collectd_plugin is set to false. Change-Id: I20302e43318c969fb15acd8e78d30cc7c5c208af