add promtail role
This commit is contained in:
5
roles/promtail/molecule/default/converge.yml
Normal file
5
roles/promtail/molecule/default/converge.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
- name: Converge
|
||||
hosts: all
|
||||
roles:
|
||||
- role: genlab.common.promtail
|
||||
24
roles/promtail/molecule/default/molecule.yml
Normal file
24
roles/promtail/molecule/default/molecule.yml
Normal 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 .
|
||||
19
roles/promtail/molecule/default/verify.yml
Normal file
19
roles/promtail/molecule/default/verify.yml
Normal 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
|
||||
Reference in New Issue
Block a user