--
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+unsubscribe@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/eb3339a4-9d6f-41c9-970c-e97155f5f512%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
`with_fileglob` runs on the ansible "controller" (localhost), not on the remote target.If you want to list files or directories on a remote target, I recommend using the `find` module, registering the results, and then using a `with_items` over the results in a later task.
On Wed, Sep 13, 2017 at 11:42 AM, Ryan Fisher <rfis...@gmail.com> wrote:
I'm attempting to use the file module to delete some cruft left over after installing Wordpress and I'm getting a not found warning when the task executes. Not sure what I'm doing wrong...On the target host, the path and files exist:$ ls /var/www/wordpress$ backwpup_30357501_measurabl-plugins.2017-09-03.txt backwpup_30357501_wordpress.sql license.txt ...Task:- name: Ensure old backup files do not existfile:path: "{{ item }}"state: absentwith_fileglob:- /var/www/wordpress/backwpup_*Output when running task:TASK [measurabl-wordpress : Ensure old backup files do not exist] **************[WARNING]: Unable to find '/var/www/wordpress' in expected paths.
--
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-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/eb3339a4-9d6f-41c9-970c-e97155f5f512%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.