From ba40209279416bb2c743240acb4f894c3e16d1f7 Mon Sep 17 00:00:00 2001 From: "Philip (a-0)" <@ph:a-0.me> Date: Sun, 22 Jan 2023 20:11:55 +0100 Subject: [PATCH] Set apt source with copy module --- tasks/main.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 27ae777..8d33e55 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -32,8 +32,11 @@ update_cache: yes - name: Add elasticsearch repo to sources - shell: - cmd: "echo \"deb https://artifacts.elastic.co/packages/6.x/apt stable main\" | tee -a /etc/apt/sources.list.d/elastic-6.x.list" + copy: + content: "deb https://artifacts.elastic.co/packages/6.x/apt stable main" + dest: "/etc/apt/sources.list.d/elastic-6.x.list" + owner: root + group: root - name: Install elasticsearch apt: