saltstack: dependencies during vm.create

13 views
Skip to first unread message

lik...@gmx.de

unread,
Jul 19, 2020, 11:15:23 AM7/19/20
to qubes...@googlegroups.com
Hi!

I'm trying to create a DVM from a TemplateVM which is also created in the same file. The DVM depends on the TemplateVM and that's why the creation fails. Running the script twice works.

My top files looks similar to:

base:
 dom0:
  - match: nodegroup
  - create-template-vm
  - create-dvm

I've played around with the "require" or "order" key words, but it doesn't work:

base:
 dom0:
  - match: nodegroup

  - create-template-vm
  - create-dvm
    - order: last

Error is:
Rendering exception occurred: Jinja error: mapping values are not allowed here; line 6

Any ideas to enforce an order during vm creation?

Thanks a lot in advance! P.

unman

unread,
Jul 20, 2020, 7:45:24 AM7/20/20
to qubes...@googlegroups.com
On Sun, Jul 19, 2020 at 04:15:17PM +0100, lik...@gmx.de wrote:
> Hi!
>
> I'm trying to create a DVM from a TemplateVM which is also created in the same file. The DVM depends on the TemplateVM and that's why the creation fails. Running the script twice works.
>
> My top files looks similar to:
>
> base:
> ??dom0:
> ?? - match: nodegroup
> ?? - create-template-vm
> ?? - create-dvm
>
> I've played around with the "require" or "order" key words, but it doesn't work:
>
> base:
> ??dom0:
> ?? - match: nodegroup
> ?? - create-template-vm
> ?? - create-dvm
> ?????? - order: last
>
> Error is:
> Rendering exception occurred: Jinja error: mapping values are not allowed here; line 6
>
> Any ideas to enforce an order during vm creation?
>
> Thanks a lot in advance! P.
>

Dont put both entries in the top file: - you can use only `create-dvm`.
`require` and `order` are connections between **states** - put them in
the state file.
Reply all
Reply to author
Forward
0 new messages