# Simulation/report

**URL:** <https://forum.ansible.com/t/simulation-report/11320>\
**Category:** Ansible Project\
**Created:** [March 4, 2012, 8:36am UTC](https://forum.ansible.com/t/simulation-report/11320 "2012-03-04T08:36:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![heijmans](https://avatars.discourse-cdn.com/v4/letter/h/87869e/32.png) [@heijmans](https://forum.ansible.com/u/heijmans)\
**Post date:** [March 4, 2012, 8:36am UTC](https://forum.ansible.com/t/simulation-report/11320/1 "2012-03-04T08:36:57Z")

</div>

Will there also be a simulation/report option available (like puppet --noop), so you could ‘see’ pretty much is going yo change, before you apply it?

Stefan

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [March 4, 2012, 1:35pm UTC](https://forum.ansible.com/t/simulation-report/11320/2 "2012-03-04T13:35:04Z")

</div>

This is a good question. While it’s not something I originally planned for, but I think it’s very possible in the short term and we should do it soon. It should be very easy for us as there is nothing preventing it.

To do this, every module will need to take a “noop=1” flag. We have a ‘changed’ attribute already in use for notify handlers.

Of the modules we have so far:

service module – idea fits well, requires some small tweaks  
copy module – idea fits well, requires some small tweaks  
template module – idea fits well, requires some small tweaks  
command module – this would probably should always return the ‘changed’ attribute.  
ping, faster, ohai – these modules don’t make changes, requires no changes

The source code behind ansible-playbook changes a tiny amount, but the source code behind runner barely changes at all. These are just module flags.

I don’t see why not.

I’ve opened [https://github.com/mpdehaan/ansible/issues/68](https://github.com/mpdehaan/ansible/issues/68) to track this – depending on how quickly we get to milestone 1, it could be in the 0.0.1 release.

I am also overdo for writing a guide on how to write modules for the docs folder. I’ve opened [https://github.com/mpdehaan/ansible/issues/69](https://github.com/mpdehaan/ansible/issues/69) to track that. We are starting to have enough conventions that it makes sense to standardize:

all returns are hashes, potentially nested

rc – numeric return code, if applicable  
failed – set as a hash key  
msg – informational message, required if failed=True  
ansible\_job\_id – used by async mode  
changed – for idempotent modules, True/False depending on if a change happened  
state – desired state. basically the “ensure=” line in Puppet speak, for services this has the value “started”, “stopped”, and “restarted”

There is already the ansible-modules(5) doc which should cover this in more detail for each module.

–Michael
