Hi All,

Please don't yell at me for posting in this group.
I have already written to the ansible project group.
They are saying it is not possible to achieve the following result.
I have written the below code and it is not working.

----
hosts: localhost
  tasks:
    - name: "subtask"
      shell: lsblk --nodeps  | grep disk | wc -l
      register: disk_count
      environment: "{{ disk_count.stdout }}"
-- 

It is throwing undefined variable disk_count. I want to capture the value of
the shell command output into an environment variable. But it is not 
working.
Can someone help me achieve this ?

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-devel/235199ad-4ac5-4928-92a1-70512b098cf8n%40googlegroups.com.

Reply via email to