Hi All, I am capturing the script output in the ansible play using register and using it on another role. The register value contains some additional characters.
- name: Extracting Hostname local_action: command /usr/bin/perl extracturl.pl {{ url }} port register: port I can get the value in stdout "80" "stderr": "", "stderr_lines": [], "stdout": "80", "stdout_lines": ["80"] Using port.stdout in a another task. Here is the issue. I am getting [u'80'] in {{ port.stdout }} . - include_role: name: roles/telnet vars: telnet_port - "{{ port.stdout }}" Any idea how to get rid of [u''] . Just I need the port no: 80 Any ideas how to do this? Cheers, Joseph -- 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 ansible-project+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/9afba275-9e3a-4c05-8cf7-b68318400ea1%40googlegroups.com.