feat: init config ansible support#488
Open
joka134 wants to merge 16 commits into
Open
Conversation
Signed-off-by: joka134 <27293650+joka134@users.noreply.github.com>
Signed-off-by: joka134 <27293650+joka134@users.noreply.github.com>
OliverTrautvetter
requested changes
Jun 16, 2026
OliverTrautvetter
left a comment
Member
There was a problem hiding this comment.
Nice new feature, some comments for it 👍
Comment on lines
+205
to
+212
| // If Ansible inventory file is provided, import host information from it | ||
| if c.Opts.AnsibleInventoryFile != "" { | ||
| err = icg.FetchFromAnsibleInventory(c.Opts.AnsibleInventoryFile) | ||
| if err != nil { | ||
| return fmt.Errorf("failed to import from Ansible inventory: %w", err) | ||
| } | ||
| } | ||
|
|
Member
There was a problem hiding this comment.
This ansible inventory integration should have tests in init_install_config_test.go
Member
Author
There was a problem hiding this comment.
Not sure about that. We don't have any tests so far for the init function and everything tested regarding FetchFromAnsibleInventory is tested in the new test file
Signed-off-by: joka134 <27293650+joka134@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adding a new flag for
oms init install-configto pass an ansible inventory that is used to fetch ceph and k8s hosts from it and fills the newly generated config with it.The main goal of this feature is to reduce manual interactions during installations on infrastructure that has been bootstrapped with ansible.
We decided to limit the format of ansible to the following for now as this is our current use case:
The first ceph node parsed is always the master during the installation.