formula_has_no_init_file

Category

Usability

Severity

Warning

What It Does

Checks in all the v2 formula folders if the file formula_folder/init.sls exists.

Why Is This Bad

Normally our formulas have an init.sls file as an entry point when using the formula. When that is not the case the user/developer of that formula should be informed in some way to make it less confusing why the init.sls is not used.

How To Fix

If the formula does not use or need an init.sls file and is used in a different way a init.sls file should be created that states with the formula does not need a init.sls.

Example init.sls from formula.helper_scripts
# The scripts are directly used with cmd.script and don't require state files.

Known Problems

None

Example

» tree states/formula/helper_scripts
states/formula/helper_scripts
├── fix_user
├── map.jinja
├── pillar.example
└── README.md

0 directories, 4 files
warning: formula `formula.helper_scripts` does not have a init.sls file at the expected path
  quickfix: create a file under "/home/athaller/code/work/salt/saltstack/states/formula/helper_scripts/init.sls" that states why this formula does not need a init.sls file

results matching ""

    No results matching ""