Hello,

I have this small playbook and t doesn't convert veriables:
---
- hosts: karma
  user: root
  sudo: True
  tasks:
    - shell: ls /images/KBU/ | grep MODULE | awk -F- '{print $4}' | awk -F. 
'{print $1}' | tail -1
      register: MODULE
      environment:
        MODULE: "{{ MODULE }}"
    - shell: echo "{{ MODULE }}"
----------------------------
at *TASK: [shell echo "{{ MODULE_GOROCO }}"] 
***************************************

it failes, it echoes the hole stdout of ansible: 
------------------
cmd:
*echo "{u'changed': True, u'end': u'2015-01-12 08:30:33.137879', u'stdout': 
u'G10R00C00', u'cmd': u"ls /images/KBU/ | grep KBUONE | awk -F- '{print 
$4}' | awk -F. '{print $1}' | tail -1", u'rc': 0, u'start': u'2015-01-12 
08:30:33.121037', u'stderr': u'', u'delta': u'0:00:00.016842', 
'invocation': {'module_name': u'shell', 'module_args': u"ls /images/KBU/ | 
grep KBUONE | awk -F- '{print $4}' | awk -F. '{print $1}' | tail -1"}, 
'stdout_lines': [u'G10R00C00'], u'warnings': []}"*
stderr: tail: option used in invalid context -- 1
tail: option used in invalid context -- 1
-----------------
it should echo this: G10R00C00. How do I echo the content of a registered 
variable ?


-- 
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 post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/97ca54af-5f67-4b3a-9cff-5faded9f1101%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to