Commit graph

14 commits

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.
2016-04-06 12:18:35 -07:00
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.
2016-01-13 11:15:24 -05:00
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`.
2015-10-22 21:26:47 -04:00
Monty Taylor
850ed126e2 Remove duplicate shade requirement 2015-06-19 17:39:57 -04:00
Monty Taylor
94a8b6dccc Make sure we're always returning objects too 2015-06-19 17:08:36 -04:00
dagnello
d7f65af6d9 Resolving secgroup.id issue in this module
secgroup['id'] was not being returned in all cases where the
specified security group exists.
2015-06-19 17:07:20 -04:00
Monty Taylor
d8c51a67f3 Actually use changed variable 2015-06-17 08:47:14 -04:00
Monty Taylor
1a11f07d29 Return the secgroup for all present states 2015-06-17 08:02:34 -04:00
Monty Taylor
ef22008cac Return secgroup, not just id 2015-06-17 04:25:55 -04:00
Brian Coca
898e338318 minor doc fixes 2015-06-16 18:56:24 -04:00
David Shrewsbury
e5cedc617a Remove 'result' value
This value is pretty much useless, and a holdover from the old
module code. Let's remove it.
2015-06-10 14:02:37 -04:00
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.
2015-06-09 16:18:38 -04:00
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.
2015-06-09 15:24:38 -04:00
Monty Taylor
1e14e51150 Add OpenStack Security Group support
Two modules - one for security groups and one to manage rules in a
security group.
2015-06-04 12:27:10 -04:00