Debug looks like it is indented too far? Needs to properly line up.
- name: Collect the JDK version of the updated package
shell: "/apps/jdk1.8.0_351/bin/java -version"
register: jdkstat
- debug:
var: jdkstat.stdout
verbosity: 2
Walter
--
Walter Rowe, Division Chief
Infrastructure Services, OISM
Mobile: 202.355.4123
On Nov 15, 2022, at 2:04 PM, Veera
<[email protected]<mailto:[email protected]>> wrote:
Hi,
I am not sure why the playbook skips the debug to print the output.
Am i missing some thing ?
- name: Collect the JDK version of the updated package
shell: "/apps/jdk1.8.0_351/bin/java -version"
register: jdkstat
- debug:
var: jdkstat.stdout
verbosity: 2
However the log shows the logs are registered under jdkstat.err .
changed: [server1] => {
"changed": true,
"cmd": "/apps/jdk1.8.0_351/bin/java -version",
"delta": "0:00:00.066018",
"end": "2022-11-15 12:45:45.676558",
"invocation": {
"module_args": {
"_raw_params": "/apps/jdk1.8.0_351/bin/java -version",
"_uses_shell": true,
"argv": null,
"chdir": null,
"creates": null,
"executable": null,
"removes": null,
"stdin": null,
"stdin_add_newline": true,
"strip_empty_ends": true,
"warn": true
}
},
"rc": 0,
"start": "2022-11-15 12:45:45.610540",
"stderr": "java version \"1.8.0_351\"\nJava(TM) SE Runtime Environment
(build 1.8.0_351-b10)\nJava HotSpot(TM) 64-Bit Server VM (build 25.351-b10,
mixed mode)",
"stderr_lines": [
"java version \"1.8.0_351\"",
"Java(TM) SE Runtime Environment (build 1.8.0_351-b10)",
"Java HotSpot(TM) 64-Bit Server VM (build 25.351-b10, mixed mode)"
],
"stdout": "",
"stdout_lines": []
}
TASK [debug]
*****************************************************************************************************************
task path: /home/veera/myplay.yml:34
skipping: [server1] => {
"skipped_reason": "Verbosity threshold not met."
Even i change the debug module content to below:, still no output in debug
- debug:
var: jdkstat.err
verbosity: 2
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
[email protected]<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/b1aea577-3c6b-4182-9cbc-a8599511e0f2n%40googlegroups.com<https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fansible-project%2Fb1aea577-3c6b-4182-9cbc-a8599511e0f2n%2540googlegroups.com%3Futm_medium%3Demail%26utm_source%3Dfooter&data=05%7C01%7Cwalter.rowe%40nist.gov%7Cb7bb2881a58c41c8bd7508dac73c33df%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C638041358627829393%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=4ci4axrtW1a%2BBXz9hQZrkYZEISa%2FgAzdglh80%2Fh032w%3D&reserved=0>.
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/D147D37C-728C-4EF3-89B3-4CAB77E83247%40nist.gov.