1

Assuming the I have the foo role which I am testing via the foo molecule scenario on several platforms.

My playbook.yml current looks like:

- import_role:
    name: foo

Now I do want to check if calling the same role with some optional variable also works and the code would look like:

- import_role:
    name: foo
  vars:
    foo_use_upstream: true

Obviously that I cannot reliably run it after the first one because the system would be in an already altered state.

Sadly I do no thave a remove-foo role that I can use and lets assume that it would be too much efforth to attempt to implement one.

I know that I could create additional scenario like foo-with-upstream.

Still multiple scenario approach does not scale well at all as it would easily become a maintenance nightmare on projects hosting more than >10 roles.

Is there another way I can use molecule to cover for this case? ... once that could start from clean docker containers on the additional use-cases?

sorin
  • 161,544
  • 178
  • 535
  • 806

0 Answers0