1. how to exclude the below from json queries or is it possible to filter in debug . I tried but couldn't sorted out . +++++++++++++++++++++++++++++++++++++ for example, I don't want to be displayed the below output. The below one doesn't have any value like that I'm getting so many .. so how to rid of it from Json query .
{ "accountStatus": "inactive", "id": "15", "name": "", "priv": "" } +++++++++++++++++++++++++++++++++++++ register: result - set_fact: user: "{{ result.configResolveClass.children|json_query(my_query) }}" vars: my_query: "[].outConfigs.children[].aaaUser.attributes[].{id: id, name: name, priv: priv}" - debug: msg="{{ user |join (" ") }}" +++++++++++++++++++++++++++++++++++++ 2. is there a way to align debug o/p ? MSG: {'id': '1', 'name': 'xxx', 'priv': 'admin'} {'id': '2', 'name': 'xxx', 'priv': 'admin'} {'id': '3', 'name': 'xxxx', 'priv': 'admin'} {'id': '4', 'name': 'xxxx', 'priv': 'admin'} {'id': '5', 'name': 'xxxx', 'priv': 'admin'} {'id': '6', 'name': 'xxxxx', 'priv': 'admin'} {'id': '7', 'name': 'xxxxx', 'priv': 'admin'} expected o/p: {'id': '1', 'name': 'xxx', 'priv': 'admin'} {'id': '2', 'name': 'xxx', 'priv': 'admin'} {'id': '3', 'name': 'xxxx', 'priv': 'admin'} {'id': '4', 'name': 'xxxx', 'priv': 'admin'} {'id': '5', 'name': 'xxxx', 'priv': 'admin'} {'id': '6', 'name': 'xxxxx', 'priv': 'admin'} {'id': '7', 'name': 'xxxxx', 'priv': 'admin'} Thanks , Ramesh -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/bba3fe2f-ebfd-4fe1-9249-08810f3ef0c1n%40googlegroups.com.