With fileglob throwing error

19 views
Skip to first unread message

Lavanya Koneru

unread,
May 10, 2021, 8:15:05 AM5/10/21
to Ansible Development
I am trying to copy files from ansible to remote host with pattern matching
Giving wildcard pattern is not working for copy

copy:
src: "{{ item }}"
dest: /ReleaseMigration
mode: 0600
with_fileglob:
- "/dql_infashared/Scripts/Deployment/script/*"

jayanth reddy

unread,
May 10, 2021, 8:21:52 AM5/10/21
to Lavanya Koneru, Ansible Development
Hello Lavanya,

Greetings!

Hope the attached pattern will work for you.

copy:
  src: /path-of-the-file (path of the file that's need to copy)
  dest: /path thats need to copy

Regards,
Jayanthreddy


--
You received this message because you are subscribed to the Google Groups "Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-deve...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-devel/17339abf-1b26-48a9-bc9c-55c93553b866n%40googlegroups.com.

Lavanya Koneru

unread,
May 10, 2021, 9:34:49 AM5/10/21
to jayanth reddy, Ansible Development
Issue is I need to copy all the files matching the pattern like data* to destination host path


On Monday, May 10, 2021, jayanth reddy <reddyja...@gmail.com> wrote:
Hello Lavanya,

Greetings!

Hope the attached pattern will work for you.

copy:
  src: /path-of-the-file (path of the file that's need to copy)
  dest: /path thats need to copy

Regards,
Jayanthreddy


On Mon, May 10, 2021, 5:45 PM Lavanya Koneru <lkone...@gmail.com> wrote:
I am trying to copy files from ansible to remote host with pattern matching
Giving wildcard pattern is not working for copy

copy:
src: "{{ item }}"
dest: /ReleaseMigration
mode: 0600
with_fileglob:
- "/dql_infashared/Scripts/Deployment/script/*"

--
You received this message because you are subscribed to the Google Groups "Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-devel+unsubscribe@googlegroups.com.


--
Thanks
Lavanya

Warron French

unread,
May 10, 2021, 7:16:16 PM5/10/21
to Ansible Development
@Lavanya,
Make life easier:
1.  Provide the full path of three files you want moved from the ansible host to the ansible agent.
2.  Provide the full path of the destination.

If nothing else provide them side-by-side for Source path/file -> Destination path/file/

On Monday, May 10, 2021 at 9:34:49 AM UTC-4 lkone...@gmail.com wrote:
Issue is I need to copy all the files matching the pattern like data* to destination host path

On Monday, May 10, 2021, jayanth reddy <reddyja...@gmail.com> wrote:
Hello Lavanya,

Greetings!

Hope the attached pattern will work for you.

copy:
  src: /path-of-the-file (path of the file that's need to copy)
  dest: /path thats need to copy

Regards,
Jayanthreddy


On Mon, May 10, 2021, 5:45 PM Lavanya Koneru <lkone...@gmail.com> wrote:
I am trying to copy files from ansible to remote host with pattern matching
Giving wildcard pattern is not working for copy

copy:
src: "{{ item }}"
dest: /ReleaseMigration
mode: 0600
with_fileglob:
- "/dql_infashared/Scripts/Deployment/script/*"

--
You received this message because you are subscribed to the Google Groups "Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-deve...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages