From 9ce1350b5fb92a3d23692e7ab4ece0bb5cfc1962 Mon Sep 17 00:00:00 2001 From: Ian Fijolek Date: Tue, 30 Aug 2022 15:15:29 -0700 Subject: [PATCH] Use nomad token to look up policies --- setup-cluster.yml | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/setup-cluster.yml b/setup-cluster.yml index b9b07ac..b620b4f 100644 --- a/setup-cluster.yml +++ b/setup-cluster.yml @@ -428,16 +428,6 @@ delegate_to: localhost run_once: true - - name: Look for policy - command: - argv: - - nomad - - acl - - policy - - list - run_once: true - register: policies - - name: Read secret command: argv: @@ -451,6 +441,18 @@ changed_when: false register: read_secretid + - name: Look for policy + command: + argv: + - nomad + - acl + - policy + - list + environment: + NOMAD_TOKEN: "{{ read_secretid.stdout }}" + run_once: true + register: policies + - name: Copy policy copy: src: ./acls/nomad-anon-policy.hcl