# Generating Operator Report in Red Hat Openshift cluster version : 4.14.31

**URL:** <https://forum.ansible.com/t/generating-operator-report-in-red-hat-openshift-cluster-version-4-14-31/39510>\
**Category:** Get Help\
**Tags:** openshift, kubernetes\
**Created:** [January 8, 2025, 6:15pm UTC](https://forum.ansible.com/t/generating-operator-report-in-red-hat-openshift-cluster-version-4-14-31/39510 "2025-01-08T18:15:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Evarist](https://avatars.discourse-cdn.com/v4/letter/e/b5e925/32.png) [@Evarist](https://forum.ansible.com/u/Evarist)\
**Post date:** [January 8, 2025, 6:15pm UTC](https://forum.ansible.com/t/generating-operator-report-in-red-hat-openshift-cluster-version-4-14-31/39510/1 "2025-01-08T18:15:18Z")

</div>

Hello Team,  
I’m Evarist from Canada fairly new with Ansible reporting.

Objective:  
I want to generate a report in openshift with jinja template for operators installed and available operators version from openshift marketplace.  
openshift version : 4.14.31

- mycode

* * *

- name: “Operator Report”  
hosts: localhost  
gather\_facts: false  
vars:  
template\_src: op-report.csv.j2  
report\_dest: /tmp/report.csv

* * *

My j2 template:  
$ cat op-report.csv.j2  
Marketplace Operators,Marketplace Catalog Source Publisher,Marketplace Operator version,Installed Operators version  
{% for PackageManifest in package.resources %}  
{{ PackageManifest.metadata.name }}, {{ PackageManifest.status.catalogSourcePublisher }}, {{ PackageManifest.status.channels[0].currentCSV}}  
{% endfor %}

* * *

Success:  
This jinja template is able to produce the required report for marketplace place operators details by looping in the “register: package variable” and print the result in csv column as reference in the j2 template correctly.  
“Marketplace Operators,Marketplace Catalog Source Publisher,Marketplace Operator version”

Question/Issue:  
How can i pass the second variable “register: operator” in the Jinja template so it can loop and print the installed operator in the clusterserviceversion onto the column “Installed Operators version” as reference in the jinja template in the same csv file?

Your help will be much appreciated.  
Thanks

CSV report for marketplace operators generated.

 ![csv for marketplace operators generated](https://us1.discourse-cdn.com/ansible/original/2X/2/2e9b3b47eb86311caf5728fb8d928dc15931711b.jpeg)
