Thank you Kai, I ran in debug noticed it was a string. I updated the command but end_host still kills the entire run for all hosts. I have 2 for testing.
"stdout": "1", "stdout": "0", Above is the output. From that I'd expect the first host to be skipped and the 2nd host to continue to execute. At least that is how I'm reading end_host should work. end_play sounds like what is being used I've tried both, both behave the same. On Friday, September 13, 2019 at 12:13:15 PM UTC-5, Damon Powell wrote: > > Both end_host and end_play seem to both cause the job to skip all hosts. I > know that only one host meets the condition so it should execute on 1 but > exits for both. Am I missing something? I thought end_host would only end > the play for the host that meets the when condition. > > > tasks: > - name: Pre java-1.8.*-openjdk package check > raw: rpm -qa java-1.8.*-openjdk | wc -l > register: package_precheck > > - block: > - name: "end play for host host if nothing to upgrade" > debug: > msg: "nothing to upgrade, ending play for host" > > - meta: end_host > when: package_precheck.stdout > 0 > > > -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/439dc434-cfa9-4f1b-ae4f-e84b0a35faf1%40googlegroups.com.
