Molecule testing of a multi-playbook repo

292 Views Asked by At

We inherited a project with a large ansible code base of multiple playbooks and local roles. The current structure reassembles a fairly normal ansible layout.

ansible
  playbooks
    a.yml
    b.yml
    c.yml
    d.yml
  templates
  files
  role
    role_a
    role_b
  inventory
   group_vars
     all
     test
     stage
     prod

We were looking to add some testing with molecule but looking for a layout that would accommodate multiple playbooks without too much restructuring of the repository. I've personally always set up cookie-cutter structures and layout for developing and testing a single role or a single playbook per repo but not anything to this extent. Some ideas:

  1. A scenario per playbook.
molecule
  a
  b
  c
  d
  1. One default with a rather large converge. This one sort of is a bit more concerning to me as these playbooks are not exactly very friendly to run on top of each other and it may not catch dependency problems between playbooks.

Any suggestions or experience with this would be appreciated.

0

There are 0 best solutions below