Ansible Module copy
Jump to navigation
Jump to search
External
Internal
Example
- name: Copy .envrc script
template:
src: envrc
dest: "{{ ansible_env.SOME_DIR }}/.envrc"
mode: "u=rw,g=r,o=r"
- name: Copy bashrc scripts
template:
src: "{{ item }}"
dest: "{{rc_d}}"
mode: "u=rwx,g=rx,o=rx"
with_fileglob:
- "*.sh"
The files can be placed in:
- <role>/templates