ansible-role-openpolicyagent/tasks/install.yml

27 lines
919 B
YAML
Raw Permalink Normal View History

2019-10-07 22:09:33 +00:00
---
- 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