From 17b991a24a48b5e498c02d7cfc529d34c4e6a267 Mon Sep 17 00:00:00 2001 From: Deshan Dissanayake Date: Fri, 4 Oct 2024 09:48:19 +0800 Subject: [PATCH] fix: update deprecated `include` with `import_tasks` --- tasks/agent-register/create-activation.yml | 2 +- tasks/main.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tasks/agent-register/create-activation.yml b/tasks/agent-register/create-activation.yml index f94ea75..0551ab7 100644 --- a/tasks/agent-register/create-activation.yml +++ b/tasks/agent-register/create-activation.yml @@ -10,7 +10,7 @@ when: "aws_ssm_activation_code is defined or aws_ssm_activation_id is defined" # Detecting the current AWS Region to use. -- include: region-detect/main.yml +- import_tasks: region-detect/main.yml when: aws_ssm_ec2_region is not defined # Creating a new IAM Managed policy to be attached to diff --git a/tasks/main.yml b/tasks/main.yml index 65493c2..e076aad 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -7,11 +7,11 @@ when: ansible_pkg_mgr is not defined and ansible_os_family != 'Windows' # Installs the AWS SSM Agent software. -- include: agent-install/main.yml +- import_tasks: agent-install/main.yml tags: - install-agent # Registers the SSM Agent on AWS SSM. -- include: agent-register/main.yml +- import_tasks: agent-register/main.yml tags: - register-agent