Closed alisinabh closed 5 years ago
Got an error:
ERROR! Syntax Error while loading YAML.
did not find expected key
The error appears to have been in 'roles/smart-monitoring/tasks/main.yaml': line 5, column 5, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- name: "Create scripts directory"
file: path=/etc/zabbix/scripts state=directory
^ here
Changing to this worked:
- name: Create scripts directory
file:
path: /etc/zabbix/scripts
state: directory
@nerijus Thank you.
I've added the fix
Hi, @alisinabh , This playbook doesn't look debian specific, Can it be used for RHEL/Centos?
Hi, @v-zhuravlev , The only debian(ish) part is the Install smartmontools
section which i added with apt
. But it can be modified to work with RHEL too using yum i guess.
Actually it looks like in ansible >= 2.0 it is possible to install packages without specifying the package manager.
I've updated the Install smartmontools
section and used generic package manager module of ansible.
Although i haven't tested it (I don't have a running RHEL) but it should work.
Thanks! How about moving it to ansible/ dir out of debian/ if it so no longer debian specific?
Done :)
I just created this Ansible playbook and used it to install zbx-smartctl on my servers.
Workflow:
smartmontools
zabbix-agent