-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create vultr_lb module #159
Conversation
82c349c
to
4067f1b
Compare
b20e7a5
to
75fadb3
Compare
I've added the symlink now. Please let me know if you have some feedback, this is my first module. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some generic comments.
DOCUMENTATION = r''' | ||
--- | ||
module: vultr_lb | ||
short_description: Manages Load Balanders on Vultr. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
short_description: Manages Load Balanders on Vultr. | |
short_description: Manages Load Balancers on Vultr |
dcid: | ||
description: | ||
- DCID integer Location in which to create the load balancer. | ||
required: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to add type: xxx
as well. (For all options.)
ssl_certificate: | ||
description: | ||
- The SSL Certificate. | ||
ssl_chain |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ssl_chain | |
ssl_chain: |
local_action: | ||
module: vultr_lb | ||
dcid: 1 | ||
algorithm: Leastconn |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
algorithm: Leastconn | |
balancing_algorithm: leastconn |
|
||
EXAMPLES = r''' | ||
- name: Ensure a Load Balancer exists | ||
local_action: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
local_action: | |
community.general.vultr_lb: |
EXAMPLES = r''' | ||
- name: Ensure a Load Balancer exists | ||
local_action: | ||
module: vultr_lb |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
module: vultr_lb |
- frontend_protocol: https | ||
frontend_port: 81 | ||
backend_protocol: https | ||
backend_port: 81 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
backend_port: 81 | |
backend_port: 81 | |
delegate_to: localhost |
from __future__ import (absolute_import, division, print_function) | ||
__metaclass__ = type | ||
|
||
ANSIBLE_METADATA = {'metadata_version': '0.1', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ANSIBLE_METADATA = {'metadata_version': '0.1', | |
ANSIBLE_METADATA = {'metadata_version': '1.1', |
argument_spec = vultr_argument_spec() | ||
argument_spec.update({ | ||
'name': { | ||
'required': True, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'required': True, | |
'type': str, | |
'required': True, |
You need to specify the type for every option.
module = AnsibleModule( | ||
argument_spec=argument_spec, | ||
required_if=[ | ||
('state', 'present', ['name', 'dcid']), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't make sense, since you marked both options name
and dcid
as always required.
We actively maintain the vultr modules in the collection https://github.com/ngine-io/ansible-collection-vultr. The PR for cleanup vultr related content in this repo is currently in the making. |
See #172. |
No problems :)
Would you like me to open the same PR, but on your repository? Otherwise, I’ll close this one.
… On 13 Apr 2020, at 17:43, Felix Fontein ***@***.***> wrote:
See #172.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
yes, please create a PR targeting the new repository, feel free to close this PR. |
Closing this one in favor of ngine-io/ansible-collection-vultr#3 . |
SUMMARY
Implement Vultr Load Balancer API (https://www.vultr.com/api/#loadbalancer)
Fixes ansible/ansible#68900
ISSUE TYPE
COMPONENT NAME
vulr_lb
ADDITIONAL INFORMATION
Goal is something like this: