It works perfectly ! Thanks again
Il giorno mer 2 set 2020 alle ore 08:35 LUCA CARANGELO <l.carang...@sirti.it> ha scritto: > Hi Vladimir, > > I'm going to test it immediately ! > > Thank you very much , I really appreciate it. > > Il giorno mar 1 set 2020 alle ore 19:12 Vladimir Botka <vbo...@gmail.com> > ha scritto: > >> On Tue, 1 Sep 2020 09:21:06 -0700 (PDT) >> LUCA CARANGELO <l.carang...@sirti.it> wrote: >> >> > 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/ >> >> Use "first_found". For example >> >> https://docs.ansible.com/ansible/latest/plugins/lookup/first_found.html#first-found-return-first-file-found-from-list >> >> - copy: >> src: "{{ lookup('first_found', params) }}" >> dest: /tmp >> vars: >> params: >> files: >> - "configuration--{{ inventory_hostname }}" >> - configuration >> paths: >> - "{{ playbook_dir }}/templates" >> >> -- >> Vladimir Botka >> > > > -- > > [image: Sirti S.p.a.] > > *Luca Carangelo* > > *System Management Manager* > IT Office dept. > Sirti S.p.A. > > p:+39 02 9588 6929 | m:+39 335 5909774 | e:l.carang...@sirti.it | w: > www.sirti.it | a:Via Stamira d'Ancona 9, 20127 Milano > -- [image: Sirti S.p.a.] *Luca Carangelo* *System Management Manager* IT Office dept. Sirti S.p.A. p:+39 02 9588 6929 | m:+39 335 5909774 | e:l.carang...@sirti.it | w: www.sirti.it | a:Via Stamira d'Ancona 9, 20127 Milano -- <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/CANOK%3DbHOa8-rO9QqhUvqW8HQZH6jhHa8-%3DNUKdgVPC31W2V5nA%40mail.gmail.com.