playbook中判断OS发行版本

---
 - name: sdasd
   shell: 'echo "aaaa"'
   when: ansible_distribution=="Ubuntu"
 - name: wewewe
   shell: 'echo "bbbb"'
   when: ansible_distribution=="CentOS"

posted @ 2022-04-29 16:00  啦啦la  阅读(39)  评论(0编辑  收藏  举报