@Dick your suggestion helped !! it works.
On Monday, March 16, 2020 at 1:27:14 PM UTC+5:30, Dick Visser wrote:
>
> Ah OK yes, i see, you're right.
> The issue is your quoting, as indicated by the error message.
> Instead of:
>
>- file: path="{{ playbook_dir }}/dashboard/{{ my_result.name
Ah OK yes, i see, you're right.
The issue is your quoting, as indicated by the error message.
Instead of:
- file: path="{{ playbook_dir }}/dashboard/{{ my_result.name }}
state=directory recurse=yes"
Do this:
- file: path="{{ playbook_dir }}/dashboard/{{ my_result.name }}"
state=directory
Hi shifa,
Can you please check whether dashboard dir is present on remote server?
Thanks,
Vivek
On Mon, Mar 16, 2020, 1:11 PM Shifa Shaikh wrote:
> Dick Hi, The issue is not with the loop as I can see the correct value
> populated using debug.
>
> Aslo, the correct value shows up in the error
Dick Hi, The issue is not with the loop as I can see the correct value
populated using debug.
Aslo, the correct value shows up in the error output from the loop ... see
below:
fatal: [localhost]: FAILED! => {"changed": false, "msg": "file
(/tmp/dashboard/APP state=directory recurse=yes) is
Hi
you've missed a few basic things. The vars file contains a duplicate
variable layers - that won't work.
Also, you appear to want to loop over the variable layers, but you
don't actually use it.
Have a look at this URL, it has some nice examples of how loops work:
Here is my variable file:
cat vars.yml
---
layers:
- name: APP
layers:
- name: WLS
Here is my playbook
cat varloop.yml
---
hosts: localhost
vars_files:
- vars.yml
tasks:
- name: Create sublinks based of bad.txt files
include_tasks: "{{