ansible/ansible-modules-core — pull request #116 by sivel (2014-10-01 23:31:18+00:00)
Title: rax module: Don't count DELETED servers when adding new servers

In some circumstances a deleted server can be reported by the API with as status of 'DELETED' until the scheduled deletion has actually completed. Currently the `rax` module will include deleted servers in the counts, and cause new servers to not be created.

This pull request adds a simple check to skip servers with a status of 'DELETED'.
Ref: https://github.com/ansible/ansible/pull/9147

In addition to that change in functionality, the following changes were made:

1. An unnecessary `else` statement was removed and the code unindented.
1. Add inline code comments to more clearly state what code is used for, making it easier to follow what is happening (A future improvement may be to move more code into new functions)
1. Add additional documentation and notes about `exact_count`

I've run all of my preset/absent tests and found no issues with these changes.