few changes

This commit is contained in:
Bertrand Lanson 2023-06-02 15:25:56 +02:00
parent 564cb99891
commit 76fe54cd3e
4 changed files with 29 additions and 13 deletions

View File

@ -16,7 +16,7 @@ Available variables are listed below, along with default values. A sample file f
Dependencies Dependencies
------------ ------------
This role has a task that installs its own dependencies located in `task/prerequisites.yml`, so that you don't need to manage them. This role requires both `ednxzu.manage_repositories` and `ednxzu.manage_apt_packages` to install consul. None.
Example Playbook Example Playbook
---------------- ----------------
@ -25,7 +25,7 @@ Example Playbook
# calling the role inside a playbook with either the default or group_vars/host_vars # calling the role inside a playbook with either the default or group_vars/host_vars
- hosts: servers - hosts: servers
roles: roles:
- ednxzu.hashicorp_consul - ednxzu.deploy_adguard
``` ```
License License

View File

@ -9,9 +9,19 @@ deploy_adguard_enable_dot: false
deploy_adguard_enable_doq: false deploy_adguard_enable_doq: false
deploy_adguard_enable_dnscrypt: false deploy_adguard_enable_dnscrypt: false
deploy_adguard_start_service: false deploy_adguard_start_service: false
deploy_adguard_node_exporter: false
deploy_adguard_virtual_ip: deploy_adguard_virtual_ip:
enable: false enable: false
interface: eth0 interface: eth0
vip_addr: "192.168.1.53" vip_addr: "192.168.1.53"
deploy_adguard_node_exporter:
enable: false
protocol: http
port: 80
username: changeme
password: changeme
exporter_port: 9617
interval: 10s
log_limit: 10000
deploy_adguard_consul:
enable: false
deploy_adguard_config: {} deploy_adguard_config: {}

View File

@ -4,4 +4,4 @@
ansible.builtin.include_tasks: prerequisites.yml ansible.builtin.include_tasks: prerequisites.yml
- name: "Import configure.yml" - name: "Import configure.yml"
ansible.builtin.include_tasks: configure.yml ansible.builtin.include_tasks: configure.yml

View File

@ -54,16 +54,18 @@ services:
node_exporter: node_exporter:
image: ebrianne/adguard-exporter:latest image: ebrianne/adguard-exporter:latest
secrets:
- adguard_passw
environment: environment:
- adguard_protocol=http adguard_protocol: {{ deploy_adguard_node_exporter['protocol'] }}
- adguard_hostname=192.168.10.252 adguard_hostname: adguard
- adguard_username=admin adguard_username: {{ deploy_adguard_node_exporter['username'] }}
- adguard_password=/run/secrets/my-adguard-pass adguard_password: /run/secrets/adguard_passw
- adguard_port= #optional adguard_port: {{ deploy_adguard_node_exporter['port'] }}
- server_port=9617 server_port: {{ deploy_adguard_node_exporter['exporter_port'] }}
- interval=10s interval: {{ deploy_adguard_node_exporter['interval'] }}
- log_limit=10000 log_limit: {{ deploy_adguard_node_exporter['log_limit'] }}
- password_from_file=true password_from_file: true
ports: ports:
- "9617:9617" - "9617:9617"
networks: networks:
@ -85,3 +87,7 @@ volumes:
o: bind o: bind
device: {{ deploy_adguard_directory }}/data device: {{ deploy_adguard_directory }}/data
type: none type: none
secrets:
adguard_passw:
file: {{ deploy_adguard_directory }}/password