REBOOTGROUP_SAT_10AM.yml:
---
- hosts: REBOOTGROUP_SAT_10AM
roles:
- common
tasks:
- assert:
that:
- commonWeekday.stdout == "Saturday"
- ansible_date_time.hour == "10"
- commonResultBackup!success
- name: Reboot the server with warning delay - Don't wait for it to complete
command: shutdown -r +5 Automated Weekly Reboot
sudo: yes
async: 600
poll: 0
ignore_errors: true
And if I test it:
$ ansible-playbook --syntax-check REBOOTGROUP_SAT_10AM.yml
playbook: REBOOTGROUP_SAT_10AM.yml
ERROR: assert is not a legal parameter in an Ansible task or handler
tasks:
- assert:
that:
- commonWeekday.stdout == "Saturday"
- ansible_date_time.hour == "10"
- commonResultBackup!success
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/895b2035-523d-4e2f-a0de-e4e447f11ec5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAJrtzLSy1p_Ya7xuAw8jOf4vNP0oxJRN7bEEiyG5U3hE97W8-w%40mail.gmail.com.