added python state

This commit is contained in:
Paul 2023-09-14 16:48:38 +02:00
parent 965ffcf747
commit 79da5575bd
3 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,3 @@
---
python:
warning_file: /usr/lib/python3.11/EXTERNALLY-MANAGED

4
states/python/init.sls Normal file
View File

@ -0,0 +1,4 @@
{%- from "python/map.jinja" import python with context %}
python-externally-managed:
file.absent:
- name: {{ python.warning_file }}

7
states/python/map.jinja Normal file
View File

@ -0,0 +1,7 @@
{%- import_yaml "python/defaults.yaml" as default_settings -%}
{%- set defaults = salt['grains.filter_by'](default_settings,
default='python')
-%}
{%- set python = salt['pillar.get']('python', default=defaults, merge=True) -%}