4d533b07ff
When running latest kayobe on alaska, needed to ensure the correct monitoring configuration was applied, I hit undefined variables, hitting errors such as: The task includes an option with an undefined variable. The error was: 'nodeexporter_restart_policy' is undefined On inspecting the role, it seems some cut and paste errors from the nodeexporter role have snook in. The command is not required for the docker_container directive, its not specified in the defaults. Interestingly this triggered when I was just trying to redeploy haproxy.
15 lines
638 B
YAML
15 lines
638 B
YAML
---
|
|
- name: Ensure cAdvisor container is running
|
|
docker_container:
|
|
image: "{{ item.value.image }}"
|
|
name: "{{ item.value.container_name }}"
|
|
network_mode: "host"
|
|
privileged: "{{ item.value.privileged | default(omit) }}"
|
|
published_ports: "{{ item.value.published_ports | default(omit) }}"
|
|
read_only: "{{ item.value.read_only | default(omit) }}"
|
|
restart_policy: "{{ cadvisor_restart_policy }}"
|
|
restart_retries: "{{ cadvisor_restart_retries | default(omit) }}"
|
|
state: "{{ item.value.enabled | ternary('started', 'absent') }}"
|
|
volumes: "{{ item.value.volumes }}"
|
|
with_dict: "{{ cadvisor_services }}"
|