在ansible-playbook中,如果要跳过错误继续执行后续task,需要使用ignore_errors参数。将ignore_errors参数设置为true,即可在task执行失败时跳过错误,继续执行后续task。例如:

- name: some task
  command: /path/to/some/command
  ignore_errors: true

此时,如果/path/to/some/command执行失败,后续task将不会被中断,继续执行。

-在ansible-playbook 中默认某个task 执行失败后后续 task 将不会被执行。如果要跳过错误继续执行需要使用什么参数

原文地址: https://www.cveoy.top/t/topic/g6VZ 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录