create salt.helper-packages state, use it to install the patch package

This commit is contained in:
m0duspwnens
2021-04-21 18:22:44 -04:00
parent 21077ef26e
commit f5ddb084b6
4 changed files with 16 additions and 5 deletions

View File

@@ -95,7 +95,6 @@ commonpkgs:
- python3-mysqldb
- python3-packaging
- git
- patch
heldpackages:
pkg.installed:
@@ -135,7 +134,6 @@ commonpkgs:
- lvm2
- openssl
- git
- patch
heldpackages:
pkg.installed:

View File

@@ -0,0 +1,3 @@
patch_package:
pkg.installed:
- name: patch

View File

@@ -7,6 +7,7 @@
include:
- salt
- salt.helper_packages
- systemd.reload
{% if INSTALLEDSALTVERSION|string != SALTVERSION|string %}

View File

@@ -2,6 +2,9 @@
{% from "salt/map.jinja" import SALT_MODULE_CODE_PATH with context %}
{% from "salt/map.jinja" import PYTHON3INFLUX with context %}
include:
- salt.helper-packages
python3_influxdb:
pkg.installed:
- name: {{ PYTHON3INFLUX }}
@@ -11,17 +14,23 @@ influxdb_continuous_query.present_patch:
file.patch:
- name: {{ SALT_STATE_CODE_PATH }}/influxdb_continuous_query.py
- source: salt://salt/files/influxdb_continuous_query.py.patch
- pkg: python3_influxdb
- require:
- pkg: python3_influxdb
- pkg: patch_package
#https://github.com/saltstack/salt/issues/59761
influxdb_retention_policy.present_patch:
file.patch:
- name: {{ SALT_STATE_CODE_PATH }}/influxdb_retention_policy.py
- source: salt://salt/files/influxdb_retention_policy.py.patch
- pkg: python3_influxdb
- require:
- pkg: python3_influxdb
- pkg: patch_package
influxdbmod.py_shard_duration_patch:
file.patch:
- name: {{ SALT_MODULE_CODE_PATH }}/influxdbmod.py
- source: salt://salt/files/influxdbmod.py.patch
- pkg: python3_influxdb
- require:
- pkg: python3_influxdb
- pkg: patch_package