ansible all -m file -a 'path=/app/tools/ state=directory'
ansible all -m get_url -a 'url="https://mirrors.aliyun.com/zabbix/zabbix/6.0/rh el/7/x86_64/zabbix-agent-6.0.13-release1.el7.x86_64.rpm" dest=/app/tools/'
复制代码
c)yum_repository模块
未来书写好yum配置文件,copy分发过去即可.
ansible all -m copy -a 'src=/etc/yum.repos.d/ dest=/etc/yum.repos.d/ backup=yes'