voxpupuli / onceover

Your gateway drug to automated infrastructure testing with Puppet
141 stars 45 forks source link

does node_groups key accept regular expressions #312

Closed ndelic0 closed 3 years ago

ndelic0 commented 3 years ago
# supported nodes
nodes:
  - foo-dev-server
  - foo-staging-server
  - foo-prod-server
  - bar-dev-server
  - bar-staging-server
  - bar-prod-server

  node_groups:
    foo_group:
      - /^foo/
    bar_group:
      - /^bar/

  class_groups:
    foo_roles:
      - '/^role::foo/'
    bar_roles:
      - '/^role::bar/'

Expecting that foo_group contain foo server definitions. Getting empty set. Tests are run only if node group members are explicitly defined

node_group:
  foo_group:
    - foo-dev-server
    - foo-staging-server
    - foo-prod-server
ndelic0 commented 3 years ago

Closing this issue. It's clear from the docs that for node_groups: We can create groups by simply specifying an array of nodes to be in the group, or use the subtractive

While for the class groups: We can create groups by simply specifying an array of classes (string or regexp) to be in the group, or use the subtractive include/exclude syntax.