Your question is a little vague without invoking the "read-my-mind" module. If you're talking about on the Ansible controller, you already have the file in a director: roles/poc/files/cluster.yml If you're asking about on the target host, if the directory already exists, you can just copy it with the copy module. Otherwise you'll need to use the file module to ensure the target directory exists before you can copy it there.
On Friday, July 8, 2022 at 12:34:33 PM UTC-4 tdub...@gmail.com wrote: > I am trying to copy a file to one host. the file will be on my ansible > host I am copying over to the remote host > > do I need to create a file folder and put the file I want copied there > > project > ├── hosts > ├── main.yml > └── roles > └── poc > ├── *files* > │ └── *cluster.yml* > ├── tasks > │ └── main.yml > └── vars > └── main.yml > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/c2989980-f6ee-4bc8-b26b-dec49a78d2b5n%40googlegroups.com.