Hi All,
I have the following in my role:
```
- name: "UPTOM_30 - Determine version from Tomcat file {{
uptom_tomcat_tar_src }}"
shell: "echo '{{ uptom_tomcat_tar_src }}' | awk -F '-' '{print $NF}'
| sed 's/.tar.gz//g'"
register: uptom_new_tomcat_version
- name: Debug1
debug:
msg: "{{ uptom_opt_dir }}/apache-tomcat-{{
uptom_new_tomcat_version.stdout }}"
```
this works in a normal playbook, but when used in a role it will give me:
```
TASK [update_tomcat : Debug1]
**********************************************************************************************************************************************************************************
Monday 19 April 2021 18:02:09 +0200 (0:00:00.847) 0:00:13.738
**********
fatal: [tstdlatoml01]: FAILED! => {"msg": "The task includes an option with
an undefined variable. The error was: 'unicode object' has no attribute
'stdout'\n\nThe error appears to have been in
'/home/people/cginkel/automation_projects/roles/update_tomcat/tasks/main.yml':
line 55, column 7, but may\nbe elsewhere in the file depending on the exact
syntax problem.\n\nThe offending line appears to be:\n\n\n - name:
Debug1\n ^ here\n"}
```
why is my stdout missing all of a sudden?
I googled it first of course, but I don't find anything related to what I
am doing here.
Plus that it works in a playbook, which throws me off.
I don't get it.
Thanks in advance.
With kind regards,
Cornelis
--
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/e46a178f-80b0-477f-8d02-f9769498eba0n%40googlegroups.com.