Hi Geeks , I have a task as below which returns me some data. I want to continuously poll this request until I get a specific attribute in response as true. Here is the response from the playbook sample1.yml:
{"_id":"89494fnfi04m0","price":"$17","isFetched": false} cat sample1.yml --- name: My application configuration uri: url: https://{{ my_app_ip | default(ansible_fqdn) }}:8080/app-config/rest/vegetables body_format: json method: GET user: "{{ my_restapi_user }}" password: "{{ my_restapi_password }}" force_basic_auth: true follow_redirects: all validate_certs: no As per above sample response , i want to continuously poll above REST API until i get "isFetched": true in response ! How can I do that? Another question i have : I have another playbook as below: (it imports above sample1.yml) cat master.yml --- - import_playbook: sample1.yml - import_playbook: sample2.yml Can I make sample2.yml import as conditional based on sample1.yml invocation result ? For example: include sample2.yml only iff isFetched= true in previous playbook response ! Are variables persisted across playbooks ? Regards Rahul -- 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 ansible-project+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAGH8rEx2aHfjP-ob5RW%3DmTD0%2BAjL6u-WYn%2B4Vhe88%3DoPhNpdgw%40mail.gmail.com.