Hi all,

I am wondering if there is some clean way to handle files supplied by
the user.

I have two use cases:

- a role that ask for ssl certificates[1]. Currently I ask the user to
  add them in their root `files/` folder under specific names, and I use
  copy + `with_item`. It works pretty well. Is this the "good way" of
  doing it?

  [1] https://github.com/Mayeu/ansible-playbook-rabbitmq#using-it

- a role that wait for a list of file. Currently I ask the user to set
  a variable with the list of filenames, put the files in the root
  `files/` folder of their playbooks, and I use copy with `with_item`.

  I would like to make something like "copy *.rb". But `with_fileglob`
  only use the role `files` as root. And setting a relative path like
  `../../files/` to get to the user ones is not a clean solution to me.

What do you think about those two?

What are the rationnal to limit `with_fileglob` to the role `files/`
folder, and not making the same logic used by the copy module for
example (checking that the path exist either in the role, or the root
playbook)?

-- 
Mayeu a.k.a Matthieu
http://6x9.fr

Attachment: signature.asc
Description: PGP signature

Reply via email to