Please try this one
---
hosts: localhost
tasks:
- name: "subtask"
command: lsblk --nodeps | grep disk | wc -l
register: disk_count_result
- name: "set fact"
set_fact:
disk_count: "{{ disk_count_result.stdout | int }}"
- name: "print disk count"
debug:
msg:
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"