evnflow
(evnflow)
1
I have a playbook and I am using the following assertion
assert:
that: ( (disk_usage|float)/mount.size_total ) < disk_limit|float
msg: “Disk usage {{ disk_usage_ratio_s }} exceeds {{ disk_limit_ratio_s }}”
any_errors_fatal: true
My question is how do I register the output of that: ( (disk_usage|float)/mount.size_total ) < disk_limit|float
I would like to register the output so I can send email when I do not get the desired result. Any advice would be appreciated.
racke
(Stefan Hornburg)
2
I have a playbook and I am using the following assertion
assert:
that: ( (disk_usage|float)/mount.size_total ) < disk_limit|float
msg: "Disk usage {{ disk_usage_ratio_s }} exceeds {{ disk_limit_ratio_s }}"
any_errors_fatal: true
My question is how do I register the output of *that: ( (disk_usage|float)/mount.size_total ) < disk_limit|float *
I would like to register the output so I can send email when I do not get the desired result. Any advice would be
appreciated.
I would run a "set_fact" task before the "assert" task which captures the output of your expression.
Regards
Racke
evnflow
(evnflow)
3
Thanks for the reply! having issues setting the “set_fact” the correct way.