I am new to Ansible and a bit stuck.
I have a python script that returns true or false.
I run this python script via ansible task.
I am trying to debug the value returned by running the py script. Additionally I would want to run another task only if the value returned is true.
Ansible Task below:
---
- name: Check XML against XSD
become: yes
shell: /usr/bin/python3 check.py
args:
chdir: "/var/www/html/det/scripts/"
register: result
tags: schema_check
- debug: var =schema_check.stdout
msg: "Testing..."
verbosity: 2
And the python script check.py
result = true
print(result)