Description
Is your feature request related to a problem? Please describe.
We have a common workflow where we need to manage services, but only when Salt is not running in a chroot. Unless we gate the state blocks with Jinja, it runs and fails since the chroot does not have enough access to perform the action.
Describe the solution you'd like
Simple parameter for every state module function which will ignore actions while in chroot, but act normally when outside of it.
Describe alternatives you've considered
Wrapper Jinja around every service state block (or macros):
{% if grains.get("virtual_subtype") != "chroot" -%}
manage_service:
service.running:
- name: service_name
{% endif -%}
Additional context
Somewhat related to issue #38751, although we don't want to take action with this workflow... whereas the solution to that issue would allow some actions to be be taken from within the chroot if allowed.
Please Note
If this feature request would be considered a substantial change or addition, this should go through a SEP process here https://github.com/saltstack/salt-enhancement-proposals, instead of a feature request.