From e538a528d1d0fbf3af251bab045b5304eb39c1a0 Mon Sep 17 00:00:00 2001 From: Josh Lay Date: Sat, 18 Dec 2021 21:44:35 -0600 Subject: [PATCH] include credentials only once --- play.yml | 3 +++ roles/create-records/tasks/main.yml | 4 ---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/play.yml b/play.yml index 89e1f37..3805d05 100644 --- a/play.yml +++ b/play.yml @@ -7,6 +7,9 @@ domains: - sampledomain.local tasks: + - name: import cloudflare creds + include_vars: + file: "~/.cloudflare.yml" - name: "enforce state for {{item}}" include_role: name: create-records diff --git a/roles/create-records/tasks/main.yml b/roles/create-records/tasks/main.yml index dbb97db..417598f 100644 --- a/roles/create-records/tasks/main.yml +++ b/roles/create-records/tasks/main.yml @@ -1,9 +1,5 @@ --- -- name: import cloudflare creds - include_vars: - file: "~/.cloudflare.yml" - - name: "create records ({{domain}})" cloudflare_dns: zone: "{{ domain }}"