Hi,
my variable contains this Json
"grafana_datasources.json": [
{
"access": "proxy",
"basicAuth": false,
"basicAuthPassword": "",
"basicAuthUser": "",
"database": "databaseName",
"id": 2,
"isDefault": false,
"jsonData": null,
"name": "InfluxDB1",
"orgId": 1,
"password": "user",
"type": "influxdb",
"url": "http://localhost:8086",
"user": "myUser"
},
{
"access": "proxy",
"basicAuth": false,
"basicAuthPassword": "",
"basicAuthUser": "",
"database": "databaseName2",
"id": 3,
"isDefault": false,
"jsonData": null,
"name": "InfluxDB2",
"orgId": 1,
"password": "user",
"type": "influxdb",
"url": "http://localhost:8086",
"user": "myUser2"
}
]
How can i extract a list of "name attribute" ?
Expected = ["InfluxDB1", "InfluxDB2"]
I'm using ansible 1.9.2
Thanks,
Yoel
--
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/c0afa79e-5bdf-4bda-b5ce-de564a2e78c5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.