Requires Help ,using Python for accessing dictionary values from yaml file
Also , the yaml file will be passed as argument as INV file command line to execute playbook:
something like :
"ansible-playbook test.yml -e INV_FILE=latest123.yaml"
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: gtp.tar
md5: 11f6987275613ca3ecf832ea59c1
product_name: gotcha
product_number: GTP 8881
release_candidate: rc19
version: 19.0.0
- tp:
file_name: tpr.tar
md5: ebd7742ed8fff0472733c0cd8e
product_name: tp
product_number: TTP 8057
release_candidate: rc25
version: 25.0.0
- device_name:
file_name: dna.tar
md5: e464e69a07123de075778aa9b7
product_name: device_name
product_number: DNP 6746
release_candidate: rc25
version: 25.0.0
Also , the yaml file will be passed as argument as INV file command line to execute playbook:
something like :
"ansible-playbook test.yml -e INV_FILE=latest123.yaml"
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: gtp.tar
md5: 11f6987275613ca3ecf832ea59c1
product_name: gotcha
product_number: GTP 8881
release_candidate: rc19
version: 19.0.0
- tp:
file_name: tpr.tar
md5: ebd7742ed8fff0472733c0cd8e
product_name: tp
product_number: TTP 8057
release_candidate: rc25
version: 25.0.0
- device_name:
file_name: dna.tar
md5: e464e69a07123de075778aa9b7
product_name: device_name
product_number: DNP 6746
release_candidate: rc25
version: 25.0.0