Re: [ansible-devel] Environment variables

2023-10-15 Thread Avinash Jadhav
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:

[ansible-devel] Environment variables

2023-10-15 Thread Y.G Kumar
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"