'beat' host_var breaks restart handler
seanpringle opened this issue · 1 comments
Beats product:
filebeat
Beats version
7.0.0
Role version: (If using master please specify github sha)
OS version (uname -a
if on a Unix-like system):
Ubuntu 18.04
Description of the problem including expected versus actual behaviour:
Defining the beat
variable as a host_var breaks the restart handler on a fresh playbook run, with: ERROR! 'beat' is undefined
. It isn't, though because role tasks referencing the variable succeed. Repeated attempts to run the playbook move the error to the next task that triggers a handler notification.
Think it might due to this limitation: ansible/ansible#48466 (comment)
Expected behaviour is that the beats role can use a host_var.
Playbook:
Please specify the full playbook used to reproduce this issue.
playbook:
- hosts: appservers
roles:
- elastic.beats
host_vars:
beat: filebeat
beat_conf:
inputs:
- type: log
enabled: true
paths:
- /opt/app/log/*.log
Provide logs from Ansible:
...
TASK [beats : Debian - Ensure apt-transport-https is installed] **********************************************************************************************
ERROR! 'beat' is undefined
Repeated runs move the error to the next task that triggers a handler notify.
Same issue with group_vars