Hi Everyone, I have an ambiguity in the find command. Can somebody clarify 
it. I have paste the tasks down(copy from some blog post on the net). I 
have an ambiguity in the second task where it says

reboot_hint.stdout.find("reboot") != -1

What does it mean, that run this task if you will not find the "reboot" 
word in the value of reboot_init variable?
OR
run this task if you will find the "reboot" word in the value of 
reboot_init variable?

Thanks in advance

- name: Check for reboot hint.
  shell: if [ $(readlink -f /vmlinuz) != /boot/vmlinuz-$(uname -r) ]; then echo 
'reboot'; else echo 'no'; fi
  ignore_errors: true
  register: reboot_hint

- name: Rebooting ...
  command: shutdown -r now "Ansible kernel update applied"
  async: 0
  poll: 0
  ignore_errors: true
  when: kernelup|changed or reboot_hint.stdout.find("reboot") != -1
  register: rebooting

- name: Wait for thing to reboot...
  pause: seconds=45
  when: rebooting|changed

-- 
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/cb5908ea-9587-4df4-b414-af3e9988a639%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to