Questions tagged [until-loop]
59 questions
                    
                    6
                    
            votes
                
                1 answer
            
        Wait for a couple of minutes to check if an URL is responding
I run a start script using Ansible as below:
- name: Start service
  raw: "source ~/.profile; ~/start.sh"
Now, I want to keep checking the HTTP status for the services I started above until it is successful — 200.
Below is how I check for HTTP…
         
    
    
        Ashar
        
- 2,942
- 10
- 58
- 122
                    4
                    
            votes
                
                1 answer
            
        Azure data factory: Handling inner failure in until/for activity
I have an Azure data factory v2 pipeline containing an until activity.
Inside the until is a copy activity - if this fails, the error is logged, exactly as in this post, and I want the loop to continue.
Azure Data Factory Pipeline 'On…
         
    
    
        Jason Welch
        
- 896
- 5
- 9
                    4
                    
            votes
                
                3 answers
            
        Bash script to check if openshift/kubernetes pods are ready
I am trying to create a shell script that will validate that certain pods are ready by checking the READY heading showing 1/1. I have tried two ways.
1.
ready=$(oc get pods | awk '{print $2}' | tail -n +2) # prints 1/1 or 0/1 for each pod
until [[…
         
    
    
        Ren
        
- 41
- 1
- 1
- 2
                    3
                    
            votes
                
                1 answer
            
        while/until loops in Nushell
How do you do while/until loops in Nushell script?
Since Nushell has a fairly amazing table/JSON parsing system, I've been trying to work with the Stack Exchange API through it.
One of the first challenges is looping over the multiple possible pages…
         
    
    
        NotTheDr01ds
        
- 15,620
- 5
- 44
- 70
                    3
                    
            votes
                
                1 answer
            
        Ruby Until-Loop: undefined method `[]' for nil:NilClass (NoMethodError)
Note: I am a novice at Ruby.
Question: How can i get print3 to print out the array, using an until loop?
This may be more simple than I realise, but i've spent a good few hours trying to solve the below. All I can find are 'simple' until loop…
         
    
    
        Bart_Judge
        
- 89
- 5
                    2
                    
            votes
                
                1 answer
            
        Why is my Do Until Loop only printing the last value in the loop?
I am writing an Excel VBA macro for a submission form. My goal is to hit the submit button and have the entered information sent to the database sheet "shTaskDB". The list has 15 available lines, but it is likely that not all these lines will be…
         
    
    
        Jared127
        
- 27
- 5
                    2
                    
            votes
                
                1 answer
            
        Checking all rows of itab against a condition via REDUCE?
In order to check whether all entries of an internal table lt_itab meet a condition COND, I would like to use REDUCE statement. The loop of course needs to terminate once a line violating COND occurs. The second code block further down seems to work…
         
    
    
        dasausTeR
        
- 23
- 1
- 6
                    2
                    
            votes
                
                1 answer
            
        Ansible best practice for breaking a string into a list of max length substrings?
This shows what I am trying to do
---
- hosts: localhost
  gather_facts: false
  vars:
    str: "abcdefg"
    str_parts: []
  tasks:
    - name: Break string into list of max 3 character parts
      set_fact:
        str_parts: "{{ str_parts + […
         
    
    
        catkin
        
- 35
- 6
                    2
                    
            votes
                
                1 answer
            
        ansible loop include_tasks and until success
I would like to know how to loop over multiple tasks until condition is met.
#main.yml
  - set_fact:
      num: 1
      req_num: 10
  - name:  Start to unregister entities
    include_tasks: output.yml
    loop: "{{ range(num, req_num + 1)|list…
         
    
    
        sloweriang
        
- 308
- 4
- 19
                    2
                    
            votes
                
                1 answer
            
        Execute ansible include_tasks until a certain condition is met (kind of while until loop)
I want to execute an include tasks list until a certain condition is met, I do not have a fixed loop but execution depends upon a condition.
A sample play below
Tasks list playbook
tasks.yml
---
- name: "inc test-var {{ test_var }}"
  set_fact:
   …
         
    
    
        DDStackoverflow
        
- 505
- 1
- 11
- 26
                    2
                    
            votes
                
                2 answers
            
        Ansible ERROR! 'retries' is not a valid attribute for a TaskInclude
My requirement is to run the script stop-all as many times (5 retries) until the output of ps -fu user1 |wc -l becomes less than 2.
I wrote the below ansible playbook for the same:
cat stop.yml
  - hosts: dest_nodes
    tasks:
      - name: Start…
         
    
    
        Ashar
        
- 2,942
- 10
- 58
- 122
                    2
                    
            votes
                
                0 answers
            
        Until loop not working, script continuing on
I have a script that generates a .log file when the job finishes. I do not want it to move on until the number of .log files equals the number of .com files. Currently, if I execute this script it will start the loop and then immediately skip…
         
    
    
        Pyrodancer123
        
- 119
- 7
                    2
                    
            votes
                
                2 answers
            
        Until loop - Why it's still working when the condition is true
Linux: Red Hat Enterprise Linux Server release 6.5 (Santiago)
BASH: GNU bash, version 4.1.2(1)-release (x86_64-redhat-linux-gnu)
One of the VM that I just provisioned is still waiting for the DNS to update it's node entries and one the node has a…
         
    
    
        AKS
        
- 16,482
- 43
- 166
- 258
                    1
                    
            vote
                
                2 answers
            
        Concatenate strings from cells using WHILE/UNTIL LOOP?
I have strings stored in cells of a column in Excel that I would like to concatenate in several pieces, like sentences, with VBA. Here is an example:
Column…
         
    
    
        VBA starter
        
- 11
- 1
                    1
                    
            vote
                
                1 answer
            
        PowerShell: How can you collect the amount of tasks that are running in a Do/Until loop?
Afternoon all,
I've got a script that runs scheduled tasks on some remote computers through Cimsessions.
Start-ScheduledTask -CimSession $CimSessions -TaskName ""
I then have a timer that runs in a Do/Until loop until the tasks are… 
         
    
    
        Fitzgery
        
- 558
- 5
- 14