ansible ignore the run_once configuration on task
问题 I am using Ansible and I want to run a task only once. I follow the documentation about how to configure and run a task only once - name: apt update shell: apt-get update run_once: true But when I run Ansible, it always runs this task. How can I run my task only once. 回答1: The run_once option will run every time your Playbook/tasks runs, but will only run it once during the specific run itself. So every time you run the play, it will run, but only on the first host in the list. If you're