Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
344 views
in Technique[技术] by (71.8m points)

amazon web services - AWS application load balancer DNS name as a variable in Ansible AWX tower playbook

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...