Re: [ansible-project] Unable to read variable in a loop using include_vars.

2020-03-03 Thread Shifa Shaikh
The reason for grabbing the ls output across servers is for audit purpose. The output of ls is send as reports and audit team uses the ls output reports to do random checks on the server. On Tuesday, March 3, 2020 at 3:29:01 PM UTC+5:30, Stefan Hornburg (Racke) wrote: > > On 3/3/20 10:53 AM,

Re: [ansible-project] Unable to read variable in a loop using include_vars.

2020-03-03 Thread Shifa Shaikh
The reason for grabbing the ls output across servers is for audit purpose. The audit team randomly checks for this output with the server. On Tue, 3 Mar, 2020, 3:29 pm Stefan Hornburg (Racke), wrote: > On 3/3/20 10:53 AM, Shifa Shaikh wrote: > > I need to get the output of ls command from

Re: [ansible-project] Unable to read variable in a loop using include_vars.

2020-03-03 Thread Stefan Hornburg (Racke)
On 3/3/20 10:53 AM, Shifa Shaikh wrote: > I need to get the output of ls command from list of remote ips and under each > ip there is are different directories. The > output of ls command needs to be saved in a file and the name of the file > should be the value of ccode variable under > the

Re: [ansible-project] Unable to read variable in a loop using include_vars.

2020-03-03 Thread Shifa Shaikh
I need to get the output of ls command from list of remote ips and under each ip there is are different directories. The output of ls command needs to be saved in a file and the name of the file should be the value of ccode variable under the variable. Thus my variable file has ip listed. Under

Re: [ansible-project] Unable to read variable in a loop using include_vars.

2020-03-03 Thread Dick Visser
I meant HIGH level. You are using ansible to achieve something - what is that? On Tue, 3 Mar 2020 at 09:20, Shifa Shaikh wrote: > > Under an ip I want a variable ccode which will be global variable for that ip. > > I also want variable name & path which will have multiple entries. > > How can I

Re: [ansible-project] Unable to read variable in a loop using include_vars.

2020-03-03 Thread Shifa Shaikh
Under an ip I want a variable ccode which will be global variable for that ip. I also want variable name & path which will have multiple entries. How can I read both single global and multiple variables name and path under a given IP ? On Tue, 3 Mar, 2020, 1:26 pm Dick Visser, wrote: > Can

Re: [ansible-project] Unable to read variable in a loop using include_vars.

2020-03-02 Thread Dick Visser
Can you tell what is the big picture? What task is this intended for? On Tue, 3 Mar 2020 at 05:43, Shifa Shaikh wrote: > Below is my playbook which loads variables and passes it to ls command on > remote hosts. > >- name: Load repository > include_vars: >file="{{ playbook_dir

[ansible-project] Unable to read variable in a loop using include_vars.

2020-03-02 Thread Shifa Shaikh
Below is my playbook which loads variables and passes it to ls command on remote hosts. - name: Load repository include_vars: file="{{ playbook_dir }}/vars/listing.yml" name=user1 - set_fact: allinonecmd: "{{ allinonecmd | default('') + 'ls -ltr ' + item.path