Did you try using async to run the command? I think you should be able to use
async with win_shell module. The other steps you describe sound like they could
be done using win_copy module and fetch module to retrieve the test results.
See https://docs.ansible.com/ansible/latest/user_guide/playbo
I use ansible from WSL most days and it works just fine for me. Unless you are
calling stuff which attempts to use a system call that hasn't been implemented
in WSL translation layer it will be fine.
The above shouldn't be an issue with WSL 2 but I haven't tried that myself.
That said I use Li
Using Python script to access values from yaml dictionary & print some of
the values as list .
For Example - Parse the each key and extract the “product_name”,
“release_candidate” and “version“ & Print results as list
The yaml file looks like
- releases:
- gotcha:
file_name:
Hi
Kindly explain where ansible comes into play in this story?
On Tue, 3 Sep 2019 at 00:18, Pawan Kumar wrote:
> Using Python script to access values from yaml dictionary & print some of
> the values as list .
>
> For Example - Parse the each key and extract the “product_name”,
> “release_can
Hi Dick,
Thanks for replying .
Well said , i was working with Ansible to parse values from dictionary file
.
working with the following ansible playbook
---
- hosts: 127.0.0.1
connection: local
vars_files:
- latest123.yaml
tasks:
- name: Printing "releases" value from yaml
My Ansible code works fine , if i call dictionary values from file .
But requires guidance , how using the yaml file to pass as argument as INV
file command line to execute playbook:
something like :
"ansible-playbook test.yml -e INV_FILE=latest123.yaml"
On Tuesday, September 3, 2019 at 4:31:
I think what you want to do to use cli is specify the path as your var name
just like your example, and then in your code when you invoke the variable,
use the file lookup:
- set_fact:
your_fact: "{{ lookup('file', INV_VAR) }}"
I'm not clear if you will need to do something beyond that for it
I wish to collect the results of SQL query so that every database column is
registered with a variable / array.
Thus, I should be able to get the values returned by three database columns
viz destip,filedets,mynum in three variables or an array / list in the same
or a different play.
Below is