27 lines
919 B
YAML
27 lines
919 B
YAML
|
---
|
||
|
- name: Download OPA binaries
|
||
|
get_url:
|
||
|
url: "{{ openpolicyagent_url }}"
|
||
|
dest: "{{ openpolicyagent_bin }}/{{ openpolicyagent_name }}_{{ openpolicyagent_version }}"
|
||
|
mode: '0755'
|
||
|
owner: "{{ openpolicyagent_user }}"
|
||
|
group: "{{ openpolicyagent_group }}"
|
||
|
checksum: "{{ vars_openpolicyagent_checksum[openpolicyagent_version] }}"
|
||
|
|
||
|
- name: Symlink the binary to the current version
|
||
|
file:
|
||
|
src: "{{ openpolicyagent_bin}}/{{ openpolicyagent_name}}_{{ openpolicyagent_version }}"
|
||
|
dest: "{{ openpolicyagent_bin }}/{{ openpolicyagent_name }}"
|
||
|
state: link
|
||
|
|
||
|
- name: Deploy systemctl environment configuration
|
||
|
template:
|
||
|
src: templates/opa.env.j2
|
||
|
dest: "{{ vars_openpolicyagent_env_var_path }}/opa"
|
||
|
|
||
|
- name: Deploy systemctl service configuration
|
||
|
template:
|
||
|
src: templates/opa.service.j2
|
||
|
dest: "{{ vars_openpolicyagent_service_path }}/opa.service"
|
||
|
notify: Reload systemctl
|