Ansible with_items会覆盖最后一行循环

jas*_*ton 6 cron ansible ansible-playbook

这是我的剧本.很简单.问题在于"with_items".它遍历所有项目,但是,它只将最后一项写入crontab文件.我认为它会覆盖它.为什么会这样?

- name: Create cron jobs to send emails                                       
  cron:                                                                                        
    name="Send emails"                                                          
    state=present                                                                              
    special_time=daily                                                                         
    job="/home/testuser/deployments/{{ item }}/artisan --env={{
item }} send:healthemail"                                                                 
  with_items:
      - london 
      - toronto
      - vancouver    
Run Code Online (Sandbox Code Playgroud)

hel*_*loV 15

cron模块期望作业名称是唯一的.将其更改为:

name="Send emails {{ item }}"
Run Code Online (Sandbox Code Playgroud)