Debug with with_items and the Task Name.

Hi All

Request your help on where to put the debug statement

Requirement 1:
If a package is missing the output should be like “Package {{ package name }} missing”

When debug is used the task name does not display instead the task is named as “debug”

TASK[Check the required OS Packages are installed] is not displayed when using debug
TASK [debug] Display this as a task name

Play Book

Use package_status.results

https://stackoverflow.com/questions/37925282/iteration-using-with-items-and-register

Hi Pranay,

if i use the package_status.results as "as below “in my play book, and the output is as below but what we need a is clean message " Package < pakage name> Missing”.

Error:

TASK [debug] ***********************************************************************************************************************************************************
fatal: [we1t1te02003p]: FAILED! => {“msg”: “‘package_status’ is undefined”}

Play Book