Yes! This is only used to avoid running the command if the file exists. The command you run must create the file if you intend to use the existence of the file to prevent running the command again.
https://docs.ansible.com/ansible/latest/collections/ansible/builtin/command_module.html The documentation for the creates parameter does not state that it creates the file for you. Walter -- Walter Rowe, Division Chief Infrastructure Services, OISM Mobile: 202.355.4123 On Nov 8, 2022, at 8:21 AM, Nobody Cares <[email protected]<mailto:[email protected]>> wrote: and how should that work if command does not create any file?! should i create a custom script, run that by ansible? [email protected]<http://linuxia.de> schrieb am Donnerstag, 5. November 2020 um 07:59:07 UTC+1: On 11/5/20 7:50 AM, Shreya Bhardwaj wrote: > Hello Everyone, > > I'm using the command module to run a few commands. > I'm using the "creates" feature of the module as a check so that re running > of command can be prevented, but it isn't > creating the file in the first place. > > what could be the possible reason of it? The module doesn't create the file. The idea is that the command itself creates that file. Regards Racke > > Thanks > > -- > 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/60336921-b23b-4b1f-9187-5ddf7dfdf648n%40googlegroups.com<https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fansible-project%2F60336921-b23b-4b1f-9187-5ddf7dfdf648n%2540googlegroups.com&data=05%7C01%7Cwalter.rowe%40nist.gov%7Cce45a0eee0db4f22c28108dac18c3507%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C638035105186302373%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=sdTs7css9ouFlrfeCUxw%2BhkRjvcyQjbXzG79LqHNy%2Bc%3D&reserved=0> > <https://groups.google.com/d/msgid/ansible-project/60336921-b23b-4b1f-9187-5ddf7dfdf648n%40googlegroups.com?utm_medium=email&utm_source=footer<https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fansible-project%2F60336921-b23b-4b1f-9187-5ddf7dfdf648n%2540googlegroups.com%3Futm_medium%3Demail%26utm_source%3Dfooter&data=05%7C01%7Cwalter.rowe%40nist.gov%7Cce45a0eee0db4f22c28108dac18c3507%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C638035105186302373%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=k2lQ3LDaP2QfZLVilx5zaP%2BS2BnUlBUwS3%2BVpG22W%2FE%3D&reserved=0>>. -- Ecommerce and Linux consulting + Perl and web application programming. Debian and Sympa administration. Provisioning with Ansible. -- 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/d7879524-4af6-4f7a-a216-8f12e3112bb0n%40googlegroups.com<https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgroups.google.com%2Fd%2Fmsgid%2Fansible-project%2Fd7879524-4af6-4f7a-a216-8f12e3112bb0n%2540googlegroups.com%3Futm_medium%3Demail%26utm_source%3Dfooter&data=05%7C01%7Cwalter.rowe%40nist.gov%7Cce45a0eee0db4f22c28108dac18c3507%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C638035105186302373%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Z9WJE9MjTx2MPU0hTsbWKy2WVZ7tK%2BXJPtekbOXaJzo%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/7050ABB0-DBDC-41E6-A556-5DD51906F499%40nist.gov.
