I need to copy a configuration file to hosts based on its custom presence in playbook templates folder.
As example : CONSIDER TO APPLY TO AN INVENTORY My hostname is HOST001 {{ inventory_hostname }} if in my playbook tamplates folder there is a file named : configuration--HOST001 then copy module with : src : "./templates/configuration--{{ inventory_hostname }}" dst: "/tmp/ if ./templates/configuration--HOST001 does not exists then copy module with : src : "./templates/configuration" dst: "/tmp/ Is there any way to do something like this ? Please let me know -- <http://www.sirti.it/> <http://linkedin.com/company/sirti> <https://www.instagram.com/sirti_/?hl=it> Sirti Società per Azioni, con sede legale in Milano, via Stamira d'Ancona n. 9, società con Socio unico PS Reti S.p.A. Capitale Sociale Euro 42.040.523 interamente versato - Codice Fiscale, Partita IVA e Iscrizione Registro delle Imprese di Milano: 04596040966 *NOTA DI RISERVATEZZA* *Questo messaggio e i suoi allegati sono destinati esclusivamente alle persone in indirizzo e può contenere informazioni riservate. Se avete ricevuto il messaggio per errore, vi informiamo che qualsiasi utilizzo dei contenuti della presente è assolutamente vietato. Vi invitiamo a rispedire immediatamente la mail al mittente e a distruggere il messaggio. Per qualsiasi dubbio, vi invitiamo a contattarci rispondendo a webmaster_si...@sirti.it <mailto:webmaster_si...@sirti.it>* * Grazie www.sirti.it <http://www.sirti.it>* * * *CONFIDENTIALITY NOTICE* *This message and its attachments are addressed solely to the persons above and may contain confidential information. If you have received the message in error, be informed that any use of the content hereof is prohibited. Please return it immediately to the sender and delete the message. Should you have any questions, please contact us by replying to webmaster_si...@sirti.it <mailto:webmaster_si...@sirti.it>* * Thank you www.sirti.it <http://www.sirti.it>* -- 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 ansible-project+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/b4d9187e-d99a-4aec-93bf-c2b02422f12an%40googlegroups.com.