我有一个这样做的剧本:
组 no_log: True 在任务中。这样,Ansible将不会记录任务
no_log: True
- name: Add Copr Yum Repository yum_repository: name: czanik-syslog-ng-githead description: Copr repo for syslog-ng-githead owned by czanik baseurl: https://copr-be.cloud.fedoraproject.org/results/czanik/syslog-ng-githead/epel-7-$basearch/ skip_if_unavailable: yes gpgkey: https://copr-be.cloud.fedoraproject.org/results/czanik/syslog-ng-githead/pubkey.gpg repo_gpgcheck: no enabled: yes no_log: True
您必须为整体设置变量 task , 的 不 强> 特别是yum模块。
task