Use nomad token to look up policies
This commit is contained in:
parent
226eb6cb05
commit
9ce1350b5f
@ -428,16 +428,6 @@
|
|||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
run_once: true
|
run_once: true
|
||||||
|
|
||||||
- name: Look for policy
|
|
||||||
command:
|
|
||||||
argv:
|
|
||||||
- nomad
|
|
||||||
- acl
|
|
||||||
- policy
|
|
||||||
- list
|
|
||||||
run_once: true
|
|
||||||
register: policies
|
|
||||||
|
|
||||||
- name: Read secret
|
- name: Read secret
|
||||||
command:
|
command:
|
||||||
argv:
|
argv:
|
||||||
@ -451,6 +441,18 @@
|
|||||||
changed_when: false
|
changed_when: false
|
||||||
register: read_secretid
|
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
|
- name: Copy policy
|
||||||
copy:
|
copy:
|
||||||
src: ./acls/nomad-anon-policy.hcl
|
src: ./acls/nomad-anon-policy.hcl
|
||||||
|
Loading…
Reference in New Issue
Block a user