Commit graph

7 commits

Author SHA1 Message Date
Jan-Piet Mens
d184f72aa9 DOCUMENTATION strings 2012-11-21 18:49:30 +01:00
Dag Wieers
f46db974bf Turn 'fail' and 'debug' modules into action_plugins
This makes more sense as there is no purpose in running these remotely.
2012-11-07 23:34:53 +01:00
Jan-Piet Mens
d069c57974 Reformat code: examples consistently
- added terse syntax to modules.rst
 - added description of special variables to template module
2012-10-23 15:14:01 +02:00
Luke Antins
4f6594e670 Fix indent of fail module example to prevent unwanted <blockquote></pre></p> <br/></blockquote> from showing up in docsite output. 2012-10-18 02:09:11 +01:00
Michael DeHaan
6769007be5 HP and vsphere modules are crazy awesome but I am thinking these belong in contrib not core. 2012-10-12 17:49:48 -04:00
Dag Wieers
02947eb0b9 This hopefully fixes the documentation for the fail module 2012-10-04 20:58:07 +02:00
Dag Wieers
2886084ac0 Added a fail module in order to fail execution on certain conditions
In some cases you may want to deliberately fail the execution of a playbook. In our provisioning workflow we want to have safeguards in place to avoid provisioning systems that are already in production. Since we reboot physical and virtual systems, it is mandatory we take all the precautions to prevent accidental provisioning.

So in our use-case we have the following at the very start of the provisioning playbook:

    ### Safeguard to protect production systems
    - local_action: fail msg="System is not ready to be staged according to CMDB"
      only_if: "'$cmdb_status' != 'to-be-staged'"

and we repeat the same task in the (separate included) play that takes care of (re)booting the system using our own boot-media, so that it cannot be accidentally separately run by someone.
2012-10-02 21:40:28 +02:00