---
- name: copy config file
  hosts: supermaster
  become: yes
  tasks:
    - name: copy caddyfile into /volume
      copy: 
        src: caddy/Caddyfile 
        dest: /volume/config/caddy/Caddyfile
    - name: copy caddyfile dockerd into /volume
      copy: 
        src: dockerd-exporter/Caddyfile 
        dest: /volume/config/dockerd-exporter/Caddyfile
    - name:  copy prometeus rules
      copy: 
        src: prometheus/rules/{{item}}
        dest: /volume/config/prometheus/rules/{{item}}
      with_items:
        - swarm_node.rules.yml
        - swarm_task.rules.yml