- name: copy SSL cert copy: src: "{{ item.source_path }}" dest: "{{ ssl_certs_install_path }}/{{ item.source_path | basename | splitext | first}}.crt" owner: root group: root mode: u=rw,g=r,o=r become: yes with_items: "{{ ssh_certs }}"