Skip to content

Conversation

@genofire
Copy link
Contributor

@genofire genofire commented May 8, 2023

solve #47

@irgama
Copy link

irgama commented Aug 25, 2023

This feature would be quite useful. I am currently just copy-pasting the module into the collection I grab via ansible-galaxy.

For setting up a ipalias, for some reason I need to set both uniqid and subnet to the IP that I want. If I leave either blank I get an error.

@genofire
Copy link
Contributor Author

Is your suggestion, to make this both parameter as required?

@irgama
Copy link

irgama commented Aug 25, 2023 via email

Copy link
Contributor

@opoplawski opoplawski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay in reviewing this. Could the review items and tests get fixed? Thanks.

@genofire
Copy link
Contributor Author

Your runner/ci-pipeline is broken ....

@opoplawski
Copy link
Contributor

Looks like the github ubuntu-latest image is broken. I've reverted to ubuntu-20.04. Please rebase on master.



VIRTUALIP_ARGUMENT_SPEC = dict(
mode=dict(required=True, choices=['proxyarp', 'carp', 'ipalias', 'other'], type='str'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this should be required - is it needed for the state = absent case?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Me too. Some code is not from me - ping @coffeelover

(And I do not touch that firewall part very often)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC a mode is required or at least one mode should be default (i would prefer ipalias).
Also for state=absent, mode is required, because only for carp and ipalias the virtual interface has to be manually removed.

)

VIRTUALIP_REQUIRED_IF = [
["mode", "carp", ["uniqid", "password", "vhid", "advbase"]],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would think we would need a "state", "present" entry.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, and an absent ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is needed for both states.


return obj

def _validate_params(self):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there no validation to be done?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do not have some, should we delete that function (replace with pass) and hope that somebody else write some?

Or is it an blocker?

@Batman781
Copy link

Batman781 commented Mar 27, 2024

Hi,
it seems that after my upgrade from 0.4.2 to 0.6.1 vip creation does not work anymore (the module name before was "pfsense virtualip" in your commit is "pfsense_virtual_ip")
Which version will contain this new commit?

@opoplawski
Copy link
Contributor

I'm not aware of there ever being a pfsense_virtualip moduile in ansible-pfsense or pfsensible/core. But yeah, this should be called pfsense_virtualip. Hopefully @genofire will have some time to fix up the issues I raised. I'm not sure I have time to do it myself.

@opoplawski
Copy link
Contributor

This still has a fair amount of cleanup to be done. Need to validate the integer inputs and need to check for vhid conflicts. I think it also should be able to generate the vhid if needed (and return it).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants