Я хочу запланировать следующую игру:
- hosts: win_hv_hosts
tasks:
- name: Return list of found updates and log to C:\ans_found_updates.txt
win_updates:
category_names: SecurityUpdates
state: searched
log_path: C:/ans_found_updates.txt
Мои win_hv_hosts:
[win_hv_hosts]
192.168.1.36
192.168.1.37
[win_hv_hosts:vars]
ansible_user = user@DOMAIN.COM
ansible_password = Password
ansible_connection = winrm
ansible_winrm_server_cert_validation=ignore
ansible_port = 5985
При запуске вручную
sudo ansible-playbook win_check_updates.yml -f 10
все в порядке.Я хочу запланировать запуск с помощью cron:
0 * * * * /usr/bin/ansible-playbook /etc/ansible/win_check_updates.yml -f 10 > /home/user/crontab.log
Я получаю ошибки:
fatal: [192.168.1.36]: UNREACHABLE! => {"changed": false, "msg": "plaintext: the specified credentials were rejected by the server", "unreachable": true}
fatal: [192.168.1.37]: UNREACHABLE! => {"changed": false, "msg": "plaintext: the specified credentials were rejected by the server", "unreachable": true}
PLAY RECAP *********************************************************************
192.168.1.36 : ok=0 changed=0 unreachable=1 failed=0
192.168.1.37 : ok=0 changed=0 unreachable=1 failed=0
Чего мне не хватает?