Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Tidy Ansible assert module loop output
+1
−0
Looping in Ansible usually produces a neat output of one line per iteration (per host):
...
ok: [Arch] => (item=something)
ok: [Arch] => (item=something_else)
ok: [Arch] => (item=yet_another_thing)
ok: [Arch] => (item=this_better_be_the_last_one)
ok: [Arch] => (item=ohh_no_it_wasnt)
ok: [Arch] => (item=they_never_stop_dont_they)
...
However when looping with the assert module the output is massive:
...
ok: [Arch] => (item=something) => {
"ansible_loop_var": "item",
"changed": false,
"item": "This isn't even an email address.",
"msg": "All assertions passed"
}
ok: [Arch] => (item=something_else) => {
"ansible_loop_var": "item",
"changed": false,
"item": "https://archlinux.org",
"msg": "All assertions passed"
}
...
How to make it neater?
1 answer
+1
−0
Works for me
The following users marked this post as Works for me:
User | Comment | Date |
---|---|---|
Iizuki | (no comment) | Sep 1, 2023 at 07:00 |
0 comment threads