有没有办法打印我作为输入传递到我的 ansible 剧本的标签值。 例如,如果我将 START 作为我的剧本有效负载中的标签传递,我如何在剧本中打印它。
我尝试使用下面的代码片段,但没有成功。
- name: Display Tags debug: var: ansible_play_tags tags: always
试试这个:
- debug: msg: "{{ ansible_run_tags }}"