From 0bd36e898a3030044a34c284c15a7671528a518b Mon Sep 17 00:00:00 2001 From: didiermfb <148888069+didiermfb@users.noreply.github.com> Date: Wed, 15 Nov 2023 16:44:23 +0100 Subject: [PATCH] feat: update python packages for onedir --- mysql/python.sls | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/mysql/python.sls b/mysql/python.sls index 736ecca8..4f18de5c 100644 --- a/mysql/python.sls +++ b/mysql/python.sls @@ -1,6 +1,22 @@ +{%- set saltpath = salt['grains.get']('saltpath') -%} + +{% if "/opt/saltstack/salt" in saltpath %} +mysqlclient_packages: + pkg.installed: + - pkgs: + - libmariadb-dev + - pkg-config + +mysqlclient: + pip.installed: + - require: + - pkg: mysqlclient_packages +{% else %} + {%- from tpldir ~ "/map.jinja" import mysql with context %} mysql_python: pkg.installed: - name: {{ mysql.pythonpkg }} - reload_modules: True +{% endif %}