I would like to know that If I run a task in a loop and save the value in a 
register, how can I save the values so that I have them accessible when I 
need them
P.S: I am running my playbook using *serial: 1 .* So, when I iterate a 
task, say 5 times, it should save them all seperately, so that when the 
playbook runs serially the second or third time around, I can use the 
registered values as needed. 
Example:

- hosts: just_created_clients
  serial: 1
  gather_facts: False
 
#
#
  tasks:
#
#
    - name: Check if the changes to config_file were successful
      shell: cat /home/imran/Desktop/tobefetched/config_file
      with_sequence: count=5      
      register: my_content
      ignore_errors: yes
#
#


Now, how do I access the values in the register(s) ? Note: I will not be 
immediately using these values, so can't have a task immediately following 
this task, which uses the results of this register sequentially

-- 
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/633b966f-4617-45b1-9699-c20208747ee9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to