diff --git a/tasks/configure_linux.yml b/tasks/configure_linux.yml index 5acd325..cbb348b 100644 --- a/tasks/configure_linux.yml +++ b/tasks/configure_linux.yml @@ -13,10 +13,9 @@ - ansible_os_family == "FreeBSD" - name: Retrieve all ec2 tags on the instance - ec2_tag: + amazon.aws.ec2_tag_info: region: '{{ ansible_ec2_placement_region }}' resource: '{{ ansible_ec2_instance_id }}' - state: list when: - telegraf_agent_aws_tags register: ec2_tags diff --git a/tasks/configure_macos.yml b/tasks/configure_macos.yml index 382de03..422f932 100644 --- a/tasks/configure_macos.yml +++ b/tasks/configure_macos.yml @@ -13,10 +13,9 @@ - ansible_os_family in ["FreeBSD", "Darwin"] - name: Retrieve all ec2 tags on the instance - ec2_tag: + amazon.aws.ec2_tag_info: region: '{{ ansible_ec2_placement_region }}' resource: '{{ ansible_ec2_instance_id }}' - state: list when: - telegraf_agent_aws_tags register: ec2_tags