Skip to content

Deprecate the ansible provision mode and playbook #3451

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

afbjorklund
Copy link
Member

Now issues a warning when validated, to be removed completely in a future version.

Closes #3450

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
Copy link
Member

@jandubois jandubois left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM

@@ -277,6 +277,7 @@ func Validate(y *LimaYAML, warn bool) error {
if _, err := os.Stat(playbook); err != nil {
return fmt.Errorf("field `provision[%d].playbook` refers to an inaccessible path: %q: %w", i, playbook, err)
}
logrus.Warnf("ansible provision mode is deprecated, use `ansible-playbook %q` instead", playbook)
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure it is clear to the user that ansible-playbook should be run directly (on the host? inside the VM?), and that it isn't a new lima.yaml setting.

Nit-picking: provision mode "ansible"

@@ -221,7 +221,7 @@ const (
ProvisionModeUser ProvisionMode = "user"
ProvisionModeBoot ProvisionMode = "boot"
ProvisionModeDependency ProvisionMode = "dependency"
ProvisionModeAnsible ProvisionMode = "ansible"
ProvisionModeAnsible ProvisionMode = "ansible" // DEPRECATED
Copy link
Member

Choose a reason for hiding this comment

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

@@ -256,6 +256,8 @@ containerd:
# # It requires `ansible-playbook` command to be installed.
# # Environment variables such as ANSIBLE_CONFIG can be used, to control the behavior of the playbook execution.
# # See ansible docs, and `ansible-config`, for more info https://docs.ansible.com/ansible/latest/playbook_guide/
# # DEPRECATED The ansible mode is deprecated, and should not be used. Instead call ansible-playbook directly,
# # either from the host after the instance is started or from the instance by running ansible locally instead.
Copy link
Member

Choose a reason for hiding this comment

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

You can add an /examples/ansible page under https://lima-vm.io/docs/examples/ for ansible-playbook

@AkihiroSuda AkihiroSuda added this to the v1.1.0 milestone Apr 21, 2025
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.

Deprecate the ansible provision playbook
3 participants