I am trying to run this play book:
pi@rpi02:/etc/ansible/playbooks $ cat ntp.yml
---
- hosts: raspbian
become: yes
vars:
ntp_server1: time.google.com
tasks:
- name: Ensure NTP (for time synclronization) is install
apt: name=ntpdate state=latest update_cache=yes
- name: Ensure ntpstat (to report the synchronisation state of the NTP daemon)
apt: name=ntpstat state=latest update_cache=yes
- name: Start service ntpdate, if not started
systemd:
name: ntp
state: restarted
enabled: yes
- name: report the synchronisation state of the NTP daemon
shell:
name: ntpstat
# ...
Every things runs fine, except the last part. I get this error:
TASK [report the synchronisation state of the NTP daemon] ******************************************************************************************************************************************************** fatal: [rpi02.daquezada.net]: FAILED! => {"changed": false, "msg": "Unsupported parameters for (command) module: name Supported parameters include: _raw_params, _uses_shell, argv, chdir, creates, executable, removes, stdin, warn"} fatal: [rpi04.daquezada.net]: FAILED! => {"changed": false, "msg": "Unsupported parameters for (command) module: name Supported parameters include: _raw_params, _uses_shell, argv, chdir, creates, executable, removes, stdin, warn"} fatal: [rpi03.daquezada.net]: FAILED! => {"changed": false, "msg": "Unsupported parameters for (command) module: name Supported parameters include: _raw_params, _uses_shell, argv, chdir, creates, executable, removes, stdin, warn"} fatal: [rpi01.daquezada.net]: FAILED! => {"changed": false, "msg": "Unsupported parameters for (command) module: name Supported parameters include: _raw_params, _uses_shell, argv, chdir, creates, executable, removes, stdin, warn"} [WARNING]: Could not create retry file '/etc/ansible/playbooks/ntp.retry'. [Errno 13] Permission denied: u'/etc/ansible/playbooks/ntp.retry'
Please advise.
Thanks
Unsupported parameters for (command) module: namemeans you cannot useshell: name: ntpstatlike that, as the fine manual will tell you - mdaniel