M
M
Mika Slepinin2016-11-15 13:04:48
linux
Mika Slepinin, 2016-11-15 13:04:48

Ansible - how to copy an entire directory?

Does not work:

- name: Копирую директорию
  copy: src=/tmp/tomcat/ dest=/tmp/tomcat2/ recursive=yes

- name: Копирую директорию
  synchronize: src=/tmp/tomcat/ dest=/tmp/tomcat2/ recursive=yes

recursive=yes removed and added, as well as remote_src=yes
There is a tomcat2 directory.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry, 2016-11-15
@plin2s

What exactly doesn't work? Apparently there is an error? Then show the output of the command (as an option with the -vvv key)
And since this is play, then add the parameters of the play itself, and not just one task.

S
silverjoe, 2016-11-15
@silverjoe

Remove the slash at the end of the source folder path

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question