I need to fetch AWS application load balancer dns name and pass it as a variable in AWX tower Ansible playbook.
Here is the playbook I am using:
---
- name: Test playbook
hosts: tag_elastic_role_logstash
tasks:
- name: Gather information about all ELBs
ec2_elb_info:
aws_access_key: XXXXXXXXXXXXXXXX
aws_secret_key: XXXXXXXXXXXXXXXX
region: ap-southeast-2
register: elb_info
- debug:
msg: "{{ elb_info }}"
But there is no output:
"msg": {
"changed": false,
"elbs": [],
"failed": false
},
I am getting the correct output when executing the command manually:
aws elbv2 describe-load-balancers --profile sandpit --region ap-southeast-2
Any idea what might be the problem with ec2_elb_info module?
question from:
https://stackoverflow.com/questions/65894451/aws-application-load-balancer-dns-name-as-a-variable-in-ansible-awx-tower-playbo 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…