我想做这样的事情:
- copy:
src: file{{ item }}.xml
dest: target_file{{ item }}.xml
notify: restart process{{ item }}
with_sequence: start=1 end={{ number_of_process }}预期结果:只有修改了配置文件target_file1才重启进程1,只有修改了配置文件target_file2才重启进程2,依此类推。
真正的结果是,当一个配置文件被修改时,所有进程都会重新启动。
有没有只重新启动所需进程的想法?
发布于 2017-03-14 03:37:38
看起来像是个窃听器。我已经把问题提交给#22579了。
如果需要解决方法,请修改ansible/plugins/strategy/__init__.py
for result_item in result_items:
if '_ansible_notify' in result_item:
# if task_result.is_changed(): # comment this line
if result_item['changed']: # add thishttps://stackoverflow.com/questions/42769314
复制相似问题