Fondamentalement, je veux itérer sur le fichier yaml, mais il imprime seulement les dernières valeurs de la configuration de yaml.Python pour boucler sur yaml config
code:
for application in config['applications']:
default_cname = '%s-%s.%s.elasticbeanstalk.com' % (application['cname'], application[‘name’], config['region'])
print (default_cname)
YAML fichier:
sqa:
region: ap-northeast-1
applications:
- name: admin
cname: wp-kb-web
name: web
cname: wp-kb
Résultats escomptés:
wp-kb-web-admin.ap-northeast-1.elasticbeanstalk.com
wp-kb-web.ap-northeast-1.elasticbeanstalk.com
Merci pour l'aide .. Cela me fait gagner beaucoup de temps .. – Raxso