extract vector into its own playbook
diff --git a/lotus-land-story/logs.yml b/lotus-land-story/logs.yml
index 9a2179f..9818c7a 100644
--- a/lotus-land-story/logs.yml
+++ b/lotus-land-story/logs.yml
@@ -1,50 +1,3 @@
-- name: Set up Vector
- tags: vector
- hosts: lotus-land-story
- vars:
- version: 0.54.0
- tasks:
-
- - name: Create Vector config dir
- ansible.builtin.file:
- path: /mnt/lotus-land-story/vector
- state: directory
- mode: "0700"
-
- - name: Configure Vector
- ansible.builtin.copy:
- src: templates/vector.yml
- dest: /mnt/lotus-land-story/vector/vector.yml
-
- - name: Run Vector
- community.docker.docker_container:
- name: vector
- image: timberio/vector:{{ version }}-debian
- restart: true
- command: -c /etc/vector/*.yml
- volumes:
- - /mnt/lotus-land-story/vector:/etc/vector:ro
- - /var/log:/var/log
- - /var/run/docker.sock:/var/run/docker.sock
- restart_policy: unless-stopped
- networks:
- - name: lotus_land_story
-
- - name: Set up logrotate for gitea.log
- ansible.builtin.copy:
- content: |
- /var/log/gitea.log
- {
- rotate 4
- weekly
- missingok
- notifempty
- compress
- delaycompress
- }
- dest: /etc/logrotate.d/gitea-ssh
- mode: "0600"
-
- name: VictoriaLogs
tags: victoria-logs
hosts: lotus-land-story
diff --git a/lotus-land-story/main.yml b/lotus-land-story/main.yml
index ab8f729..f177c4a 100644
--- a/lotus-land-story/main.yml
+++ b/lotus-land-story/main.yml
@@ -65,5 +65,7 @@
- import_playbook: security.yml # noqa: name[play]
- import_playbook: backup.yml # noqa: name[play]
- import_playbook: homebox.yml # noqa: name[play]
+- import_playbook: vector.yml # noqa: name[play]
+- import_playbook: logs.yml # noqa: name[play]
# vim: ft=yaml.ansible
diff --git a/lotus-land-story/vector.yml b/lotus-land-story/vector.yml
new file mode 100644
index 0000000..15d22f9
--- /dev/null
+++ b/lotus-land-story/vector.yml
@@ -0,0 +1,48 @@
+- name: Vector
+ tags: vector
+ hosts: lotus-land-story
+ vars:
+ version: 0.54.0
+ tasks:
+
+ - name: Create Vector config dir
+ ansible.builtin.file:
+ path: /mnt/lotus-land-story/vector
+ state: directory
+ mode: "0700"
+
+ - name: Configure Vector
+ ansible.builtin.copy:
+ src: templates/vector.yml
+ dest: /mnt/lotus-land-story/vector/vector.yml
+
+ - name: Run Vector
+ community.docker.docker_container:
+ name: vector
+ image: timberio/vector:{{ version }}-debian
+ restart: true
+ command: -c /etc/vector/*.yml
+ volumes:
+ - /mnt/lotus-land-story/vector:/etc/vector:ro
+ - /var/log:/var/log
+ - /var/run/docker.sock:/var/run/docker.sock
+ restart_policy: unless-stopped
+ networks:
+ - name: lotus_land_story
+
+ - name: Set up logrotate for gitea.log
+ ansible.builtin.copy:
+ content: |
+ /var/log/gitea.log
+ {
+ rotate 4
+ weekly
+ missingok
+ notifempty
+ compress
+ delaycompress
+ }
+ dest: /etc/logrotate.d/gitea-ssh
+ mode: "0600"
+
+# vim: ft=yaml.ansible