Коллеги, хочется выполнить самописный скрипт на хостах.
Сам скрипт достаточно прост:
#!/bin/bash
find ./ -type f -size +1M
# cat ../playbooks/check_logs.yml
- hosts: racnodes
tasks:
- name: Check logs with size greater than 1M in /var/log
- script: /etc/ansible/scripts/check_logs.sh
ansible-playbook check_logs.sh --list-host
Получаю ошибку:
# ansible-playbook check_logs.sh --list-host
ERROR! playbooks must be a list of plays
The error appears to have been in '/etc/ansible/scripts/check_logs.sh': line 2, column 1, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
#!/bin/bash
find ./ -type f -size +1M
^ here