export all ec2 tags

33 views
Skip to first unread message

esxi...@gmail.com

unread,
Dec 18, 2021, 6:38:47 PM12/18/21
to Ansible Project
Hi

below playbook only export 1 ec2 tags

Any please suggestions how can i modify to export all 


---
  - name: ec2 info
    hosts: local
    connection: local
    tasks:
      - name: EC2 info
        amazon.aws.ec2_tag_info:
          region: us-east-1
          validate_certs: no
          resource: i-*
        register: instance_tags
      - name: Displaying output
        ansible.builtin.debug:
          var: instance_tags

Dick Visser

unread,
Dec 19, 2021, 12:50:03 AM12/19/21
to ansible...@googlegroups.com
On Sun, 19 Dec 2021 at 00:39, esxi...@gmail.com <esxi...@gmail.com> wrote:
Hi

below playbook only export 1 ec2 tags

That is ambiguous. 
Please provide a better description. 
Does it mean tags for one instance?  Or a single tag for multiple instances.
Or something else even.

Best to just paste real playbook output.

Also does this wildcard pattern for the resource parameter actually work? 
The docs (
Is this maybe the source of your problem?



--
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 ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/4c60d403-644b-439d-abc2-0399853c57can%40googlegroups.com.
--
Sent from a mobile device - please excuse the brevity, spelling and punctuation.
Reply all
Reply to author
Forward
0 new messages