
- hosts: all
  tasks:
  - file:
      dest: /tmp/templates
      state: "{{item}}"
    with_items: ["absent", "directory"]

  - copy:
      dest: /tmp/templates/{{item}}
      mode: 0755
      content:
        Hello from {{item}}
    with_sequence: start=1 end={{end|default(20)}}
