Help needed to construct a cvs list of values from a dictionary

19 views
Skip to first unread message

The Gripmaster

unread,
Apr 6, 2017, 7:31:12 AM4/6/17
to Ansible Project
I have a dictionary like this

customers:
  abc
:
    id
: 1
    status
: active
 
def:
    id
: 2
    status
: inactive
  ghi
:
    id
: 3
    status
: active
  jkl
:
    id
: 4
    status
: active


What's the easiest (Ansible) way to construct a string like below assigned to a variable of the active customers only?

abc,ghi,jkl


Reply all
Reply to author
Forward
0 new messages