Use nomad token to look up policies

This commit is contained in:
IamTheFij 2022-08-30 15:15:29 -07:00
parent 1c57d9f7f6
commit 9c07141dd1
1 changed files with 12 additions and 10 deletions

View File

@ -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