# Some important features in Ansible that I'd like to see ('creates', 'removes', 'run\_once\_by')

**URL:** <https://forum.ansible.com/t/some-important-features-in-ansible-that-id-like-to-see-creates-removes-run-once-by/20265>\
**Category:** Ansible Developer\
**Created:** [January 19, 2016, 7:40am UTC](https://forum.ansible.com/t/some-important-features-in-ansible-that-id-like-to-see-creates-removes-run-once-by/20265 "2016-01-19T07:40:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexey.vazhnov](https://avatars.discourse-cdn.com/v4/letter/a/b487fb/32.png) [@alexey.vazhnov](https://forum.ansible.com/u/alexey.vazhnov)\
**Post date:** [January 19, 2016, 7:40am UTC](https://forum.ansible.com/t/some-important-features-in-ansible-that-id-like-to-see-creates-removes-run-once-by/20265/1 "2016-01-19T07:40:00Z")

</div>

Hi!

I want to suggest a few major and valuable, as I see it, features and invite community to discuss:

- Add ‘creates’ and ‘removes’ parameters for any task, not only for modules like ‘shell’, as it works now.
- Add ‘run\_once\_by’ parameter for running task once for each unique value of ‘run\_once\_by’.

For example: I have a variable ‘ec2\_region’ and need to create security groups once in region, so I’ll able to do the following:

`- name:`  
`sudo: False`  
`delegate_to: 127.0.0.1`  
`run_once_by: "{{ ec2_region }}"`  
`ec2_group:`  
`…`

So, I think these are may be pretty useful and often appliable for practic usage.

P.S. Previously, this message was mistakenly posted in «Ansible Project» [https://groups.google.com/d/msg/ansible-project/nGg-l6sh\_c4/DggA42pmAAAJ](https://groups.google.com/d/msg/ansible-project/nGg-l6sh_c4/DggA42pmAAAJ)

---

<div class="post-metadata">

**Author:** ![Dossy\_Shiobara](https://avatars.discourse-cdn.com/v4/letter/d/838e76/32.png) [@Dossy\_Shiobara](https://forum.ansible.com/u/Dossy_Shiobara)\
**Post date:** [January 19, 2016, 4:56pm UTC](https://forum.ansible.com/t/some-important-features-in-ansible-that-id-like-to-see-creates-removes-run-once-by/20265/2 "2016-01-19T16:56:34Z")

</div>

Make `run_once_by` an alias of `with_items`?

---

<div class="post-metadata">

**Author:** ![willthames](https://avatars.discourse-cdn.com/v4/letter/w/8dc957/32.png) [@willthames](https://forum.ansible.com/u/willthames)\
**Post date:** [February 1, 2016, 2:30am UTC](https://forum.ansible.com/t/some-important-features-in-ansible-that-id-like-to-see-creates-removes-run-once-by/20265/3 "2016-02-01T02:30:16Z")

</div>

They’re necessary for command and shell so that Ansible can tell whether the task needs to do anything (if not it can just set changed=false and continue).

What benefits would we get through having them for other modules?

Will
