lima icon indicating copy to clipboard operation
lima copied to clipboard

Make sure that ansible params check the playbook

Open afbjorklund opened this issue 1 year ago • 5 comments

The ansible provisioning supports using a separate yaml playbook, so check this file (but only the top playbook) for any parameters...

The ansible-playbook command does not run remotely so it does not use the param.env, which means that the env is set on the command.

afbjorklund avatar Oct 02 '24 18:10 afbjorklund

The ansible provisioning was missed in the original "params" feature addition:

  • https://github.com/lima-vm/lima/pull/2570

A similar change to the verification would need be needed for any external scripts:

  • https://github.com/lima-vm/lima/pull/2442

i.e. to check any "path", in addition to "script"

again, checking only the top path should be OK

afbjorklund avatar Oct 02 '24 18:10 afbjorklund

This PR seems to be missing a check in https://github.com/lima-vm/lima/blob/16fd466a16c9e42caf40d3a220b0003bd36bf3de/hack/test-templates.sh#L158-L163

limactl shell "$NAME" test -e /tmp/param-ansible

jandubois avatar Oct 03 '24 01:10 jandubois

similar change to the verification would need be needed for any external scripts:

i.e. to check any "path", in addition to "script"

again, checking only the top path should be OK

I don't understand what this means.

jandubois avatar Oct 03 '24 01:10 jandubois

For the "script", we check the parameter - for the "path", it needs an os.ReadFile first

afbjorklund avatar Oct 03 '24 05:10 afbjorklund

This PR seems to be missing a check

I renamed the file, to look like the others.

afbjorklund avatar Oct 03 '24 05:10 afbjorklund

@jandubois LGTY?

AkihiroSuda avatar Apr 17 '25 02:04 AkihiroSuda