我想优化下面的yaml成单块
- name: Download Amazon CloudWatch Agent for Debian
when: ansible_facts['ansible_distribution'] == 'Debian'
get_url:
url: "https://s3.amazonaws.com/amazoncloudwatch-agent/debian/amd64/latest/amazon-cloudwatch-agent.deb"
dest: "/tmp/temp_files/amazon-cloudwatch-agent.deb"
- name: Download Amazon CloudWatch Agent for RHEL
when: ansible_facts['ansible_distribution'] == 'RedHat'
get_url:
url: "https://s3.amazonaws.com/amazoncloudwatch-agent/redhat/amd64/latest/amazon-cloudwatch-agent.rpm"
dest: "/tmp/temp_files/amazon-cloudwatch-agent.rpm"```
1条答案
按热度按时间m1m5dgzv1#
下面的剧本展示了如何为各种发行版创建参数