add vector role
This commit is contained in:
25
roles/vector/tasks/main.yml
Normal file
25
roles/vector/tasks/main.yml
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
- name: Install Vector via official script
|
||||
ansible.builtin.shell: bash -c "$(curl -L https://setup.vector.dev)"
|
||||
args:
|
||||
creates: /usr/bin/vector
|
||||
|
||||
- name: Install Vector
|
||||
ansible.builtin.apt:
|
||||
name: vector
|
||||
state: present
|
||||
|
||||
- name: Deploy config
|
||||
become: true
|
||||
ansible.builtin.template:
|
||||
src: templates/vector.yaml.j2
|
||||
dest: "{{ vector_setup.config_path }}"
|
||||
owner: root
|
||||
notify:
|
||||
- Restart Service
|
||||
|
||||
- name: Enable and start Vector service
|
||||
ansible.builtin.systemd:
|
||||
name: vector
|
||||
enabled: yes
|
||||
state: started
|
||||
Reference in New Issue
Block a user