fix ansible-lint errors
This commit is contained in:
@@ -11,8 +11,8 @@ Role Variables
|
|||||||
|
|
||||||
(all optional)
|
(all optional)
|
||||||
`promtail_version`: version to install
|
`promtail_version`: version to install
|
||||||
`loki_server`: set loki server
|
`promtail_loki_server`: set loki server
|
||||||
`loki_port`: set loki port
|
`promtail_loki_port`: set loki port
|
||||||
`custom_server_config`: path to custom config witch replace all config with your own
|
`custom_server_config`: path to custom config witch replace all config with your own
|
||||||
`custom_scrape_configs`: path to custom scrape configs
|
`custom_scrape_configs`: path to custom scrape configs
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,6 @@
|
|||||||
promtail_version: 2.7.3
|
promtail_version: 2.7.3
|
||||||
promtail_positions_path: /home/promtail/positions.yaml
|
promtail_positions_path: /home/promtail/positions.yaml
|
||||||
promtail_http_port: 9080
|
promtail_http_port: 9080
|
||||||
loki_server: localhost
|
promtail_loki_server: localhost
|
||||||
loki_port: 3100
|
promtail_loki_port: 3100
|
||||||
add_var_logs: true
|
promtail_add_var_logs: true
|
||||||
|
|||||||
@@ -7,13 +7,13 @@
|
|||||||
- name: "Include default vars"
|
- name: "Include default vars"
|
||||||
ansible.builtin.include_vars:
|
ansible.builtin.include_vars:
|
||||||
dir: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') }}/defaults/"
|
dir: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') }}/defaults/"
|
||||||
extensions: [ 'yml' ]
|
extensions: ['yml']
|
||||||
|
|
||||||
- name: "Sanity check the Promtail daemon"
|
- name: "Sanity check the Promtail daemon"
|
||||||
retries: 3
|
retries: 3
|
||||||
delay: 1
|
delay: 1
|
||||||
register: this
|
register: promtail_this
|
||||||
failed_when: "this.content != 'Ready'"
|
failed_when: "promtail_this.content != 'Ready'"
|
||||||
ansible.builtin.uri:
|
ansible.builtin.uri:
|
||||||
url: "http://localhost:{{ promtail_http_port }}/ready"
|
url: "http://localhost:{{ promtail_http_port }}/ready"
|
||||||
return_content: true
|
return_content: true
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
- name: "Install packages"
|
- name: "Install packages"
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
name: [ acl, unzip ]
|
name: [acl, unzip]
|
||||||
state: present
|
state: present
|
||||||
update_cache: true
|
update_cache: true
|
||||||
cache_valid_time: 3600
|
cache_valid_time: 3600
|
||||||
|
|||||||
@@ -9,10 +9,10 @@ positions:
|
|||||||
filename: {{ promtail_positions_path }}
|
filename: {{ promtail_positions_path }}
|
||||||
|
|
||||||
clients:
|
clients:
|
||||||
- url: "http://{{ loki_server }}:{{ loki_port }}/loki/api/v1/push"
|
- url: "http://{{ promtail_loki_server }}:{{ promtail_loki_port }}/loki/api/v1/push"
|
||||||
|
|
||||||
scrape_configs:
|
scrape_configs:
|
||||||
{% if add_var_logs %}
|
{% if promtail_add_var_logs %}
|
||||||
- job_name: system
|
- job_name: system
|
||||||
static_configs:
|
static_configs:
|
||||||
- targets:
|
- targets:
|
||||||
|
|||||||
Reference in New Issue
Block a user