Ansible Module copy: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 4: Line 4:


=Internal=
=Internal=
* [[Ansible_Concepts#copy|Ansible Concepts]]
* [[Ansible_Concepts#copy|Ansible Concepts]]
=Overview=
Also see: {{Internal|Ansible_Concepts#Role_Files|Ansible Concepts | Role Files}}


=Example=
=Example=


<syntaxhighlight lang='yaml'>
<syntaxhighlight lang='yaml'>
- name: Copy .envrc script
  template:
    src: envrc
    dest: "{{ ansible_env.SOME_DIR }}/.envrc"
    mode: "u=rw,g=r,o=r"
</syntaxhighlight>
</syntaxhighlight>


The files can be placed in:
The files can be placed in:


* <role>/files
* ?

Latest revision as of 07:33, 4 July 2021