Skip to content

[BUG] Newer SaltStack Versions Are More-Pedantic About replace Parameter #637

Open

Description

@ferricoxide

Describe the bug

When running formula using newer versions of Saltstack, a warning message like:

[WARNING ] State for file: /etc/fapolicyd/rules.d/30-aws.rules - Neither 'source' nor 'contents' nor 'contents_pillar' nor 'contents_grains' was defined, yet 'replace' was set to 'True'. As there is no source to replace the file with, 'replace' has been set to 'False' to avoid reading the file unnecessarily.

When the ash-linux/el8/VendorSTIG/aws_cli_v2.sls and ash-linux-formula/ash-linux/el9/VendorSTIG/aws_cli_v2.sls files are referenced

Severity

  • Completely Broken (No work-around evident)
  • Severely Broken (Work-around possible but difficult)
  • Moderately Broken (Trivial work-around)
  • Nuisance (Functions but untrapped errors can slip through)

To Reproduce
Steps to reproduce the behavior:

  1. Deploy new ELx host
  2. Run formula
  3. Look in run-logs for the previously transcribed log-snippet

Expected behavior

No warning is emitted

Deviance Description

Warning message is emitted. While effectively innocuous, it may alarm more-casual formula-users

Screenshots

Additional context

Fix Suggestions

Add:

    - replace: True

To mentioned states

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions