Commit Graph

7 Commits (c7cf2bc3438432f840169e68842904a3f97970ba)

Author SHA1 Message Date
Jan-Piet Mens caf003c813 DOCUMENTATION strings 12 years ago
Dag Wieers d8459425a0 Turn 'fail' and 'debug' modules into action_plugins
This makes more sense as there is no purpose in running these remotely.
12 years ago
Jan-Piet Mens feab57e270 Reformat code: examples consistently
- added terse syntax to modules.rst
 - added description of special variables to template module
12 years ago
Luke Antins 4f17aa9fa0 Fix indent of fail module example to prevent unwanted `<blockquote></pre></p> <br/></blockquote>` from showing up in docsite output. 12 years ago
Michael DeHaan aa98c84a62 HP and vsphere modules are crazy awesome but I am thinking these belong in contrib not core. 12 years ago
Dag Wieers 3d5c4df2ac This hopefully fixes the documentation for the fail module 12 years ago
Dag Wieers 1d27909ec0 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.
12 years ago