## Summary - Add pre-commit framework with hooks for YAML, Ansible, Python, shell, TOML, JSON, and secret detection - Fix all 91+ ansible-lint violations (variable naming, handler capitalization, changed_when) - Fix shellcheck warnings in mise-tasks scripts - Document pre-commit setup in README.md ## Deployment and Testing - [x] All pre-commit hooks pass (`uvx pre-commit run --all-files`) - [x] Test ansible playbook with `--check` mode - [x] Run `mise run indri-services-check` after deploy 🤖 Generated with [Claude Code](https://claude.com/claude-code) Reviewed-on: https://forge.tail8d86e.ts.net/eblume/blumeops/pulls/19
38 lines
943 B
YAML
38 lines
943 B
YAML
---
|
|
# Loki installation and configuration
|
|
|
|
- name: Install loki via homebrew
|
|
community.general.homebrew:
|
|
name: loki
|
|
state: present
|
|
|
|
- name: Ensure loki data directory exists
|
|
ansible.builtin.file:
|
|
path: "{{ loki_data_dir }}"
|
|
state: directory
|
|
mode: '0755'
|
|
|
|
- name: Ensure loki chunks directory exists
|
|
ansible.builtin.file:
|
|
path: "{{ loki_data_dir }}/chunks"
|
|
state: directory
|
|
mode: '0755'
|
|
|
|
- name: Ensure loki rules directory exists
|
|
ansible.builtin.file:
|
|
path: "{{ loki_data_dir }}/rules"
|
|
state: directory
|
|
mode: '0755'
|
|
|
|
- name: Deploy loki configuration
|
|
ansible.builtin.template:
|
|
src: loki-config.yaml.j2
|
|
dest: "{{ loki_config_file }}"
|
|
mode: '0644'
|
|
notify: Restart loki
|
|
|
|
- name: Ensure loki service is started
|
|
ansible.builtin.command: brew services start loki
|
|
register: loki_brew_start
|
|
changed_when: "'Successfully started' in loki_brew_start.stdout"
|
|
failed_when: false
|