-
Notifications
You must be signed in to change notification settings - Fork 2
pfsense haproxy frontend #1
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
base: main
Are you sure you want to change the base?
pfsense haproxy frontend #1
Conversation
|
@opoplawski are you on discord/slack/something? |
|
othehunter on discord. |
| @@ -0,0 +1,163 @@ | |||
| # -*- coding: utf-8 -*- | |||
|
|
|||
| # Copyright: (c) 2021, Chris Morton, cosmo@cosmo.2y.net | |||
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 may want to update the year range here.
| @@ -0,0 +1,139 @@ | |||
| # -*- coding: utf-8 -*- | |||
|
|
|||
| # Copyright: (c) 2021, Chris Morton, cosmo@cosmo.2y.net | |||
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.
And here.
| #!/usr/bin/python | ||
| # -*- coding: utf-8 -*- | ||
|
|
||
| # Copyright: (c) 2019, Frederic Bor <frederic.bor@wanadoo.fr> |
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 probably want to add yourself here.
| DOCUMENTATION = """ | ||
| --- | ||
| module: pfsense_haproxy_frontend | ||
| version_added: "0.6.0" |
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.
Change to 0.2.0 now.
| DOCUMENTATION = """ | ||
| --- | ||
| module: pfsense_haproxy_frontend_server | ||
| version_added: "0.6.0" |
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.
0.2.0
| extaddr=dict(required=True, type='str'), | ||
| extaddr_port=dict(required=True, type='int'), | ||
| extaddr_ssl=dict(required=True, type='str'), |
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 really don't want anything other name the id field to be required, otherwise you break removal with just the id. Use required_if with state present.
| status=dict(required=True, type='str'), | ||
| desc=dict(required=True, type='str'), |
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 really don't want anything other name the id field to be required, otherwise you break removal with just the id. Use required_if with state present.
|
As an FYI - I'm doing a lot of work here: https://github.com/opoplawski/pfsensible-core/tree/module_base_extended to extend PFSenseModuleBase and write |
Add complete Ansible module implementation for HAProxy frontends and frontend servers with corrected required field logic. Module Utils Changes: - Update copyright year to 2025 in haproxy_frontend.py - Update copyright year to 2025 in haproxy_frontend_server.py - Change required=True to required=False for non-primary-key fields (status, desc, extaddr, extaddr_port, extaddr_ssl) - Only primary identifiers remain required (name, frontend) New Ansible Modules: - Add pfsense_haproxy_frontend module for managing HAProxy frontends - Add pfsense_haproxy_frontend_server module for managing bind addresses - Set version_added to 0.2.0 for new release - Include comprehensive documentation and examples - Follow existing backend module patterns for consistency This allows deletion operations with minimal parameters (just state=absent plus identifier) and maintains consistency with the existing backend module architecture. Addresses feedback from: pfsensible#1
Add complete Ansible module implementation for HAProxy frontends and frontend servers with corrected required field logic. Module Utils Changes: - Update copyright year to 2025 in haproxy_frontend.py - Update copyright year to 2025 in haproxy_frontend_server.py - Change required=True to required=False for non-primary-key fields (status, desc, extaddr, extaddr_port, extaddr_ssl) - Only primary identifiers remain required (name, frontend) New Ansible Modules: - Add pfsense_haproxy_frontend module for managing HAProxy frontends - Add pfsense_haproxy_frontend_server module for managing bind addresses - Set version_added to 0.2.0 for new release - Include comprehensive documentation and examples - Follow existing backend module patterns for consistency This allows deletion operations with minimal parameters (just state=absent plus identifier) and maintains consistency with the existing backend module architecture. Addresses feedback from: pfsensible#1
Add complete Ansible module implementation for HAProxy frontends and frontend servers with corrected required field logic. Module Utils Changes: - Update copyright year to 2025 in haproxy_frontend.py - Update copyright year to 2025 in haproxy_frontend_server.py - Change required=True to required=False for non-primary-key fields (status, desc, extaddr, extaddr_port, extaddr_ssl) - Only primary identifiers remain required (name, frontend) New Ansible Modules: - Add pfsense_haproxy_frontend module for managing HAProxy frontends - Add pfsense_haproxy_frontend_server module for managing bind addresses - Set version_added to 0.2.0 for new release - Include comprehensive documentation and examples - Follow existing backend module patterns for consistency This allows deletion operations with minimal parameters (just state=absent plus identifier) and maintains consistency with the existing backend module architecture. Addresses feedback from: pfsensible#1
haproxy frontend changes.
may need updating if any of the base haproxy pfsense plugin has added new fields/etc.
looks like some of the comments/ still have references to the backend.
Will clean up.