You are asking us to solve your problem. You aren't asking us a question about ansible itself.
Walter -- Walter Rowe, Division Chief Infrastructure Services, OISM Mobile: 202.355.4123 On Jan 27, 2023, at 8:32 AM, javed khan Siddque <[email protected]> wrote: 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]<mailto:[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<https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fansible-project%2Fc364f32a-b419-4313-a9d5-8085384f658an%2540googlegroups.com%3Futm_medium%3Demail%26utm_source%3Dfooter&data=05%7C01%7Cwalter.rowe%40nist.gov%7C6b754e1713204b3b9ae808db006af799%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C638104231658651108%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=B4OyIMIln8RSsmR7FwncYuqerBKxqJ4lfV1stnyPVus%3D&reserved=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/B3FE7E22-191E-4234-8AD5-A580440E014A%40nist.gov.
