# copy each confi file on each server

**URL:** <https://forum.ansible.com/t/copy-each-confi-file-on-each-server/21962>\
**Category:** Ansible Project\
**Created:** [July 8, 2016, 11:55am UTC](https://forum.ansible.com/t/copy-each-confi-file-on-each-server/21962 "2016-07-08T11:55:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![alex\_podolin](https://avatars.discourse-cdn.com/v4/letter/a/8dc957/32.png) [@alex\_podolin](https://forum.ansible.com/u/alex_podolin)\
**Post date:** [July 8, 2016, 11:55am UTC](https://forum.ansible.com/t/copy-each-confi-file-on-each-server/21962/1 "2016-07-08T11:55:47Z")

</div>

Hi all. I hope anybody can help me.  
I have a few servers called SERVER-01 SERVER-02…SERVER-N  
and \*.conf files for this servers

# tree roles/put\_cameras/files/nginx/

roles/put\_cameras/files/nginx/  
├──SERVER-01  
│ ├── config01.conf  
│ ├── config02.conf

├── SERVER-02  
│ ├── config01.conf  
│ ├── config02.conf

…

├── SERVER-N  
│ ├── config01.conf  
│ ├── config02.conf

can you tell me, how to put files from files/nginx/SERVER-01/{_.conf} to SERVER-01 /etc/nginx; files/nginx/SERVER-02/{_.conf} to SERVER-02 /etc/nginx; files/nginx/SERVER-N/{\*.conf} to SERVER-N /etc/nginx;  
I think i can do it throw loops? but i don’t understand how…

---

<div class="post-metadata">

**Author:** ![Mark\_Janssen](https://avatars.discourse-cdn.com/v4/letter/m/e9c0ed/32.png) [@Mark\_Janssen](https://forum.ansible.com/u/Mark_Janssen)\
**Post date:** [July 11, 2016, 10:34am UTC](https://forum.ansible.com/t/copy-each-confi-file-on-each-server/21962/2 "2016-07-11T10:34:41Z")

</div>

Something like this ? (directly copied from a play I use… not tweaked to your settings 😉 )

#!/usr/bin/env ansible-playbook

# Fetch files from remote hosts
