Ohhhh hoooooooooooooooooooooo, OMG, kai you are really great. thanks for supporting.
@ban thanks a lot for your time: you both made my day On Sunday, September 30, 2018 at 4:57:12 PM UTC+2, [email protected] wrote: > HI all, > > I am trying to get the disk information of target machine. > > 1. I want to check the newly added disk which is fully free, means there > is no partition created. > 2. running a loop like /dev/sda to /dev/sdz and that should fail if > patition is not created and print the me last failed disk. can someone help > me ? > > I have tried bellow playbook in Linux machine. let me know the changes. > > Thanks in advance. > > - hosts: one > become: true > tasks: > - shell: " lsblk | grep -i disk | awk '{print$1}' " > register: part > - debug: > msg: "{{part.stdout_lines}}" > - shell: "fdisk -l /dev/{{item}}1 | grep -i cylinders" > register: new > with_items: > - "{{part.stdout_lines}}" > #until: '"cylinders" not in new.stdout' > failed_when: new.rc == 1 > ignore_errors: true > - debug: > msg: "{{item.new}}" > -- 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 [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/ac9a367b-bac1-4f13-9b85-1c5897eb0b84%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
