Guidelines for playbook: Rule relations

Intro

By design, the file playbook_catalog.yaml will define the relationship between rules and playbooks.

The relationships between rules and playbooks are as follows:

  1. If the rule does not appear in playbook_catalog.yaml - do not execute any playbook.

  2. If the rule does appear in playbook_catalog.yaml with the relevant vendor - execute the relevant playbook.

  3. If the rule appears in playbook_catalog.yaml with no relevant vendor, but default playbook exists - execute the relevant playbook.

  4. If the rule appears in playbook_catalog.yaml with no relevant vendor, but default playbook does not exist - do not execute any playbook.

Example1: playbook_catalog.yaml

cross_vendor_compare_model:

default: test.yml

cross_vendor_compare_domain:

vendors:

checkpoint: test.yml

Example2: Link to indeni-knowledge master branch

 

Development

The playbooks will be located under Indeni-Knowledge repository, under:

indeni-knowledge/automation/playbook_catalog.yaml

Deployment

Similarly to the rules, playbook_catalog.yaml will be copied to Indeni-Knowledge folder, under:

/usr/share/indeni-knowledge/stable/automation/playbook_catalog.yaml

Whenever a new playbook is ready for testing, need to update playbook_catalog.yaml, and add the playbooks in the corresponding path, and test.

 

For the first phase, no overriding logic will be supported.