add promtail role

This commit is contained in:
Sergey Malyuk
2025-12-17 17:58:14 +03:00
parent cb48bdd979
commit 5b6ecbd32d
16 changed files with 308 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
---
- name: Converge
hosts: all
roles:
- role: genlab.common.promtail

View File

@@ -0,0 +1,24 @@
---
dependency:
name: galaxy
driver:
name: docker
platforms:
- name: ubuntu
image: geerlingguy/docker-ubuntu2204-ansible:latest
pre_build_image: true
command: ${MOLECULE_DOCKER_COMMAND:-""}
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
cgroupns_mode: host
privileged: true
provisioner:
name: ansible
playbooks:
converge: converge.yml
verifier:
name: ansible
lint: |
set -e
yamllint .
ansible-lint .

View File

@@ -0,0 +1,19 @@
---
- name: Verify
hosts: all
gather_facts: false
tasks:
# https://github.com/ansible/molecule/issues/3587#issuecomment-1158650179
- name: "Include default vars"
ansible.builtin.include_vars:
dir: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') }}/defaults/"
extensions: [ 'yml' ]
- name: "Sanity check the Promtail daemon"
retries: 3
delay: 1
register: this
failed_when: "this.content != 'Ready'"
ansible.builtin.uri:
url: "http://localhost:{{ promtail_http_port }}/ready"
return_content: true