-
Notifications
You must be signed in to change notification settings - Fork 101
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
split keepalived config and refactoring #203
Conversation
evrardjp@cd60ab6 credits to magnusbe I replaced ``|length > 0`` with ``is iterable``
evrardjp@d59c740 Credits to @naphta I implemented @evrardjp suggested changes.
* Add support for ``vrrp_track_file`` and ``track_files`` evrardjp#140 evrardjp#140 Credits to @jjungnickel
I see a lot of progress, thanks @Kariton ! |
|
||
# Remove all keepalived configurations | ||
# Clears entire {{ keepalived_config_directory_path }} | ||
keepalived_flush_configuration: False |
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.
We should not introduce a variable to flush the configuration, instead, the state of the other variables should help us figure out what to do (the variable contains the full state). If truly impossible to do, then the deployer can just run an ad-hoc ansible command to clean up (and not need an extra variable).
The idea of the previous config was that if you were to change it, you would never have something laying around that cause an issue of misconfiguration.
@evrardjp Thanks for that. I know that I did a lot of changes and even correction to those. I actually think Im done within this overall draft. In another branch I just started to work on an It is possible to slit this in different PRs. How should I split this into different PRs? ""general code update""
""feature / function update""
|
Before we go into subdivising this work into body of work that are reviewable separately, I will watch this PR for its concept. What I can see at first glance: A) the general code update concept is great. It can be one PR or 3. It definitely needs to be at least 3 commits though: 1 commit for fqcn, 1 commit for revert, 1 commit with loop refactoring. Please let's not forget any change in tox/molecule (ensure the right versions/dependencies). B) Feature/Function update. C) resolve existing PRs Should we start with point C, and then move forward with A and B? What do you prefer? (I feel however that B should come after A) |
Thanks for your input and praise.
As my changes would impact the overall template and tasks structure I would resolve existing PRs first or second. Later on a rebase would not be feasible.
And second (or first) handle 'A' - general code update.
And last but not least the feature / function part as it will result in the mentioned new code base.
My changes are destructive to some git mechanics like rebase or revert etc.
Im glad that you are willing to look into my PR.
Greetings,
Kariton
…----------------------------------------
13.06.2022 12:57:10 Jean-Philippe Evrard ***@***.***>:
Before we go into subdivising this work into body of work that are reviewable separately, I will watch this PR for its concept.
What I can see at first glance:
A) the general code update concept is great. It can be one PR or 3. It definitely needs to be at least 3 commits though: 1 commit for fqcn, 1 commit for revert, 1 commit with loop refactoring. Please let's not forget any change in tox/molecule (ensure the right versions/dependencies).
B) Feature/Function update.
The ansible_managed is linked to how we do templating. I would do that into function update. (it's a new feature to record this).
task/main can indeed be split into multiple files, especially if those are very clear about their scope. I will check readability, as good readability increases contributions.
For the state multiuse, I think I like the concept, but I want to make sure it "feels as a whole" (disabling should change configuration/remove scripts). I need to review this in more details.
C) resolve existing PRs
I don't think we should solve existing PRs inside new PRs, instead we should promote collaboration. But maybe I am idealistic here ;)
I however, would be okay, to move things forward, that we work together on new PRs to fix the existing state. I want to say a big THANK YOU to you for taking that one. Or I should add https://media.giphy.com/media/KzM1lAfJjCWNq/giphy.gif .
Should we start with point C, and then move forward with A and B? What do you prefer? (I feel however that B should come after A)
—
Reply to this email directly, view it on GitHub[#203 (comment)], or unsubscribe[https://github.com/notifications/unsubscribe-auth/AQCYKFAUKRU7IDGUEJNU4B3VO4HYLANCNFSM5YLIGAPA].
You are receiving this because you were mentioned.[Verfolgungsbild][https://github.com/notifications/beacon/AQCYKFE6PDE7Z5Z7COAR5X3VO4HYLA5CNFSM5YLIGAPKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOITCSUPY.gif]
|
To continue my work on this I need some guidance. My thoughts: As pointed out earlier my changes are destructive to some git mechanics - especially rebase. I already altered some IMO useful "no-answer" PRs to help with that. How I would like to continue:
I don't want to implement the |
Hello, I agree with you on the splitting, and started to merge some of those great PRs of yours. I would love to keep the current draft PR open, as it gives a few ideas about the future. Yet, we'll resolve in the different PRs :) |
solved and not needed anymore as i found another solution which is sufficent: |
split
task/main.yml
in multiple filesuse FQCN
use
ansible_managed | comment
use loop instead of with_*
split keepalived configs into separated directories / files
keepalived_instances.INSTANCE.state
is multiuse (the configuration file state / optional configuration state) ->absent | d(present) / ['MASTER', 'BACKUP']