Running a task on a single host always with Ansible?
问题 I am writing a task to download a database dump from a specific location. It will always be run on the same host. So I am including the task as follows in the main playbook: tasks: include: tasks/dl-db.yml The content of the task is: --- - name: Fetch the Database fetch: src=/home/ubuntu/mydb.sql.gz dest=/tmp/mydb.sql.bz fail_on_missing=yes But I want it to fetch from a single specific host not all hosts. Is a task the right approach for this? 回答1: If all you need to happen is that it's only