title: How do you copy multiple files using remote_src in Ansible?
body: <p>When I run the command  remote_src: true I get the error
  ERROR! 'remote_src' is not a valid attribute for a Task
  I was wondering if there is a better way to write the code or if this is a bug</p>
  <p>Tried to remove the offending line of code, however, the files exist on the remote host so I'm unable to copy the files into the correct location</p>
  <pre><code>- hosts: openvpn_server
    
    vars:
      file_vars:
       - { name: ca }
       - { name: server }
    
    tasks:
  
     - name: check if ca.crt and server.crt exists
       stat:
         path: /tmp/{{ item.name }}.crt
       with_items: &quot;{{ file_vars }}&quot;
       register: ensure_ca_crt_exists
  
     - name: copying server.crt and ca.crt
       become: true
       copy: src={{ item.src }} dest={{ item.dest }} 
       with_items:
        - { src: '/tmp/server.crt' , dest: '/etc/openvpn/server.crt' }
        - { src: '/tmp/ca.crt' , dest: '/etc/openvpn/ca.crt' } 
       remote_src: true
  
  
       when: ensure_ca_crt_exists.results
      
     - name: creating Diffie-Hellman key to use during key exchange
       shell: ./easyrsa gen-dh
       args:
        chdir: ~/EasyRSA-v3.0.6/
      
     - name: Generating HMAC signature to strengthen servers TLS integrity
       shell: openvpn --genkey --secret ta.key
      
     - name: copying ta.key and dh.pem to /etc/openvpn
       become: true
       copy: src={{ item.src }} dest={{ item.dest }} 
       with_items:
         - { src: '/home/dc/EasyRSA-v3.0.6/ta.key' , dest: '/etc/openvpn/ta.key' }
         - { src: '/home/dc/EasyRSA-v3.0.6/dh.pem' , dest: '/etc/openvpn/dh.pem' }
  
  </code></pre>
  <p>I should be able to copy the file from the tmp folder to /etc/openvpn folder
  via the remote_src command, apologizes for the badly configured register I'm fairly new to ansible</p>