阻止Ansible Synchronize模块创建临时目录

时间:2018-06-07 15:32:45

标签: ansible rsync

我正在使用Ansible Synchronize module,所以:

- name: Synchronization of src on the control machine to dest on the remote hosts
  synchronize:
    src: http-checks/
    dest: "{{ datadog_path }}/conf.d/http_check.d/"
    delete: yes
    recursive: yes

执行playbook后,将使用此目录结构创建名为~core/的目录:

├── ansible.cfg
├── hosts
├── site.yaml
└── ~core
    └── .ansible
        └── tmp
            └── ansible-tmp-1528320500.98-124390628295059
                └── synchronize.py

问题:如何阻止创建目录?

我在ansible docs或rsync docs中找不到对这个tmp目录的任何引用。

1 个答案:

答案 0 :(得分:0)

看过https://github.com/ansible/ansible/issues/21562

似乎我需要在for wait in waits: sleep_until(start) print('Time to make the donuts') start += wait 中添加remote_tmp

ansible.cfg