From d792c65ce326e246ae603fcf3b82dd162da4ac60 Mon Sep 17 00:00:00 2001 From: m0duspwnens Date: Wed, 21 Apr 2021 09:25:25 -0400 Subject: [PATCH] change how influx is patch and python3-influxdb is installed --- salt/influxdb/init.sls | 11 ++++------- salt/salt/minion.sls | 20 +------------------- salt/salt/python3-influxdb.sls | 23 +++++++++++++++++++++++ 3 files changed, 28 insertions(+), 26 deletions(-) create mode 100644 salt/salt/python3-influxdb.sls diff --git a/salt/influxdb/init.sls b/salt/influxdb/init.sls index 67342f826..55f350099 100644 --- a/salt/influxdb/init.sls +++ b/salt/influxdb/init.sls @@ -12,10 +12,7 @@ include: - salt.minion - -python3-influxdb: - pkg.installed: - - name: python3-influxdb + - salt.python3-influxdb # Influx DB influxconfdir: @@ -77,7 +74,7 @@ telegraf_database: - influxdb_host: {{ MANAGER }} - require: - docker_container: so-influxdb - - pkg: python3-influxdb + - sls: salt.python3-influxdb {% for rp in influxdb.retention_policies.keys() %} {{rp}}_retention_policy: @@ -96,7 +93,7 @@ telegraf_database: - docker_container: so-influxdb - influxdb_database: telegraf_database - file: influxdb_retention_policy.present_patch - - pkg: python3-influxdb + - sls: salt.python3-influxdb {% endfor %} {% for dest_rp in influxdb.downsample.keys() %} @@ -113,7 +110,7 @@ so_downsample_cq: - docker_container: so-influxdb - influxdb_database: telegraf_database - file: influxdb_continuous_query.present_patch - - pkg: python3-influxdb + - sls: python3-influxdb {% endfor %} {% endif %} diff --git a/salt/salt/minion.sls b/salt/salt/minion.sls index 2ac66c81a..41f9bfaf2 100644 --- a/salt/salt/minion.sls +++ b/salt/salt/minion.sls @@ -67,22 +67,4 @@ salt_minion_service: patch_pkg: pkg.installed: - - name: patch - - -#https://github.com/saltstack/salt/issues/59766 -influxdb_continuous_query.present_patch: - file.patch: - - name: /usr/lib/python3.6/site-packages/salt/states/influxdb_continuous_query.py - - source: salt://salt/files/influxdb_continuous_query.py.patch - -#https://github.com/saltstack/salt/issues/59761 -influxdb_retention_policy.present_patch: - file.patch: - - name: /usr/lib/python3.6/site-packages/salt/states/influxdb_retention_policy.py - - source: salt://salt/files/influxdb_retention_policy.py.patch - -influxdbmod.py_shard_duration_patch: - file.patch: - - name: /usr/lib/python3.6/site-packages/salt/modules/influxdbmod.py - - source: salt://salt/files/influxdbmod.py.patch \ No newline at end of file + - name: patch \ No newline at end of file diff --git a/salt/salt/python3-influxdb.sls b/salt/salt/python3-influxdb.sls new file mode 100644 index 000000000..0f8cad42e --- /dev/null +++ b/salt/salt/python3-influxdb.sls @@ -0,0 +1,23 @@ +python3_influxdb: + pkg.installed: + - name: python3-influxdb + +#https://github.com/saltstack/salt/issues/59766 +influxdb_continuous_query.present_patch: + file.patch: + - name: /usr/lib/python3.6/site-packages/salt/states/influxdb_continuous_query.py + - source: salt://salt/files/influxdb_continuous_query.py.patch + - pkg: python3_influxdb + +#https://github.com/saltstack/salt/issues/59761 +influxdb_retention_policy.present_patch: + file.patch: + - name: /usr/lib/python3.6/site-packages/salt/states/influxdb_retention_policy.py + - source: salt://salt/files/influxdb_retention_policy.py.patch + - pkg: python3_influxdb + +influxdbmod.py_shard_duration_patch: + file.patch: + - name: /usr/lib/python3.6/site-packages/salt/modules/influxdbmod.py + - source: salt://salt/files/influxdbmod.py.patch + - pkg: python3_influxdb \ No newline at end of file