标签:des dep ceil 拷贝 文件拷贝 flat ceph file yam
fetch实现将多台服务器的同名文件拷贝到本地且不覆盖
--- - hosts: lly user: root gather_facts: no vars: eccpt: - /etc/ceilometer/pipeline.yaml - /etc/ceilometer/ceilometer.conf - /etc/nova/nova.conf - /etc/libvirt/libvirtd.conf tasks: - name: copy needed files fetch: src={{item}} dest=/var/check_back/lly/{{ lookup(‘pipe‘, ‘date +%Y%m%d‘) }}/{{inventory_hostname}}/ flat=yes with_items: - "{{eccpt}}" ansible clm -m fetch -a ‘src=/etc/keep dest=/var/check_back/lly/{{ lookup(‘pipe‘, ‘date +%Y%m%d‘) }}/{{inventory_hostname}}/ flat=yes ‘ ansible -i inventory_all clm -m fetch -a ‘src=/etc/keepalived/keepalived.conf dest=/home/deployer/luoliyu/keepalived/20170908/{{inventory_hostname}}/ flat=yes ‘
ansible -i inventory_all hosts -m fetch -a ‘src=/etc/ceph/ceph.conf dest=/home/onest/luoliyu/config_dir/20170922/{{inventory_hostname}}_ceph.conf flat=yes ‘
标签:des dep ceil 拷贝 文件拷贝 flat ceph file yam
原文地址:http://www.cnblogs.com/luoliyu/p/7495847.html