Commit Graph

14 Commits (4c8e32ee27db53cf9b7ab47f21c2f6eb6b7d930e)

Author SHA1 Message Date
David Shrewsbury 6970cc233f Wrap calls to main() with if check
A change was merged to the main Ansible core code that can cause

a potential hang if any libraries are called that use threading.

This change was:



  4b0aa1214c



This affected the os_object module by causing a hang on the shade

create_object() API call (which in turn calls swiftclient which

uses threading). The fix is to make sure all modules have a main()

that is wrapped with an "if __name__ == '__main__'" check.
9 years ago
David Shrewsbury e8abea25c7 Fix OpenStack module failure output
The exception message, when shade fails, will contain much more
specific information about the failure if the exception is treated
as a string. The 'message' attribute alone is usually not helpful.
9 years ago
Lars Kellogg-Stedman da0fbfc564 allow empty description attribute for os_security_group
The `os_security_group` module would fail if there was no `description:`
attribute:

    localhost | FAILED! => {
        "changed": false,
        "failed": true,
	"msg": "Error creating security group larstest: Invalid input for
	description. Reason: 'None' is not a valid string."
    }

This commit makes the default description `''` rather than `None`.
9 years ago
Monty Taylor 850ed126e2 Remove duplicate shade requirement 9 years ago
Monty Taylor 94a8b6dccc Make sure we're always returning objects too 9 years ago
dagnello d7f65af6d9 Resolving secgroup.id issue in this module
secgroup['id'] was not being returned in all cases where the
specified security group exists.
9 years ago
Monty Taylor d8c51a67f3 Actually use changed variable 9 years ago
Monty Taylor 1a11f07d29 Return the secgroup for all present states 9 years ago
Monty Taylor ef22008cac Return secgroup, not just id 9 years ago
Brian Coca 898e338318 minor doc fixes 9 years ago
David Shrewsbury e5cedc617a Remove 'result' value
This value is pretty much useless, and a holdover from the old
module code. Let's remove it.
9 years ago
David Shrewsbury 5be1b64b85 Update the docstring for os_security_group
Indicate that idempotence is on security group names, and give
an example for updating a security group description.
9 years ago
David Shrewsbury c298741aa6 Update for latest shade API
Shade version 0.7.0 introduces new API methods for creating,
deleting, and updating security groups. Let's use those and
clean up the module.
9 years ago
Monty Taylor 1e14e51150 Add OpenStack Security Group support
Two modules - one for security groups and one to manage rules in a
security group.
9 years ago