--
hosts: appservers
- name: Get the latest release.
register: rel
ERROR: run_once is not a legal parameter in an Ansible task or handler
Or 2:
New in version 1.7.
In some cases there may be a need to only run a task one time and only on one host. This can be achieved by configuring “run_once” on a task:
---
# ...
tasks:
# ...
- command: /opt/application/upgrade_db.py
run_once: true
# ...