From 2c941ef4674413ab270d9a1d27f39380bdaa2c2f Mon Sep 17 00:00:00 2001 From: Paul Lecuq Date: Sat, 27 Nov 2021 13:34:59 +0100 Subject: [PATCH] updated go-aptproxy state --- states/go-aptproxy/install.sls | 16 ++++++++-------- states/go-aptproxy/map.jinja | 2 +- states/go-aptproxy/qrz.service.j2 | 4 ++-- states/go-aptproxy/service.sls | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/states/go-aptproxy/install.sls b/states/go-aptproxy/install.sls index 6a49b69..3fcf070 100644 --- a/states/go-aptproxy/install.sls +++ b/states/go-aptproxy/install.sls @@ -1,19 +1,19 @@ --- -{%- from "go-aptproxy/map.jinja" import go-aptproxy with context %} +{%- from "go-aptproxy/map.jinja" import goaptproxy with context %} go-aptproxy-archive-extract: archive.extracted: - - name: {{ go-aptproxy.release_dir }}/go-aptproxy-{{ go-aptproxy.version }} - - source: {{ go-aptproxy.mirror }}/{{ go-aptproxy.version }}/go-aptproxy-{{ go-aptproxy.version }}-{{ go-aptproxy.os }}-{{ go-aptproxy.arch }}.tar.gz + - name: {{ goaptproxy.release_dir }}/go-aptproxy-{{ go-aptproxy.version }} + - source: {{ goaptproxy.mirror }}/{{ go-aptproxy.version }}/go-aptproxy-{{ go-aptproxy.version }}-{{ go-aptproxy.os }}-{{ go-aptproxy.arch }}.tar.gz - skip_verify: true - enforce_toplevel: false - - if_missing: {{ go-aptproxy.release_dir }}/go-aptproxy-{{ go-aptproxy.version }} + - if_missing: {{ goaptproxy.release_dir }}/go-aptproxy-{{ go-aptproxy.version }} - watch_in: - service: go-aptproxy-service go-aptproxy-binary-symlink: file.symlink: - - name: {{ go-aptproxy.install_dir }}/go-aptproxy - - target: {{ go-aptproxy.release_dir }}/go-aptproxy-{{ go-aptproxy.version }} + - name: {{ goaptproxy.install_dir }}/go-aptproxy + - target: {{ goaptproxy.release_dir }}/go-aptproxy-{{ go-aptproxy.version }} - require: - archive: go-aptproxy-archive-extract - watch_in: @@ -22,5 +22,5 @@ go-aptproxy-binary-symlink: go-aptproxy-cleanup: software.cleanup: - name: go-aptproxy - - path: {{ go-aptproxy.release_dir }} - - version: {{ go-aptproxy.version }} + - path: {{ goaptproxy.release_dir }} + - version: {{ goaptproxy.version }} diff --git a/states/go-aptproxy/map.jinja b/states/go-aptproxy/map.jinja index 71222df..84db1a0 100644 --- a/states/go-aptproxy/map.jinja +++ b/states/go-aptproxy/map.jinja @@ -11,4 +11,4 @@ ) -%} -{%- set go-aptproxy = salt['pillar.get']('go-aptproxy', default=defaults, merge=True) -%} \ No newline at end of file +{%- set goaptproxy = salt['pillar.get']('go-aptproxy', default=defaults, merge=True) -%} \ No newline at end of file diff --git a/states/go-aptproxy/qrz.service.j2 b/states/go-aptproxy/qrz.service.j2 index 4f5c626..b37cbed 100644 --- a/states/go-aptproxy/qrz.service.j2 +++ b/states/go-aptproxy/qrz.service.j2 @@ -1,5 +1,5 @@ ## {{ salt['pillar.get']('salt_managed', default='Salt Managed') }} -{%- from "go-aptproxy/map.jinja" import go-aptproxy with context %} +{%- from "go-aptproxy/map.jinja" import goaptproxy with context %} [Unit] Description=go-aptproxy Documentation=https://git.paulbsd.com/paulbsd/go-aptproxy @@ -7,7 +7,7 @@ After=network.target [Service] Type=simple -ExecStart={{ go-aptproxy.install_dir }}/go-aptproxy/go-aptproxy -directory {{ go-aptproxy.working_dir }} -port {{ go-aptproxy.port }} +ExecStart={{ goaptproxy.install_dir }}/go-aptproxy/go-aptproxy -directory {{ goaptproxy.working_dir }} -port {{ goaptproxy.port }} ExecReload=/bin/kill -HUP $MAINPID Restart=on-failure RestartForceExitStatus=SIGPIPE diff --git a/states/go-aptproxy/service.sls b/states/go-aptproxy/service.sls index 27f631f..299a329 100644 --- a/states/go-aptproxy/service.sls +++ b/states/go-aptproxy/service.sls @@ -1,5 +1,5 @@ --- -{%- from "go-aptproxy/map.jinja" import go-aptproxy with context %} +{%- from "go-aptproxy/map.jinja" import goaptproxy with context %} go-aptproxy-service-file: file.managed: - name: /etc/systemd/system/go-aptproxy.service