i am looking for some concent like below

1) Look For /var/test01 , if not there create it- test01
2) Look For /var/test01 , if already exist then move to next name :- test02 
(move like next integer number)
3) Look for /var/test01 or 02 , then move to next name :- test03 (move like 
next integer number)
   and so on.


the below concept is not working 


- name: "Register a Variable and Search to perform Operation"
  hosts: localhost
  tasks:
    - name: Create a series of directories with even numbers for some reason
      ansible.builtin.file:
        dest: "/var/test{{ '%02d' | format(item) }}"
        state: directory
        mode: '0655'
      become: true
      loop: "{{ range(0, 100) | list }}"

-- 
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/c364f32a-b419-4313-a9d5-8085384f658an%40googlegroups.com.

Reply via email to