-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.sls
More file actions
33 lines (29 loc) · 758 Bytes
/
init.sls
File metadata and controls
33 lines (29 loc) · 758 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{% from "linuxpatch-saltstack/map.jinja" import lp_key %}
linuxpatch:
file.managed:
- name: /tmp/install.sh
- source: https://linuxpatch.com/install.sh
- mode: '0755'
- makedirs: True
- unless: test -f /opt/linuxpatch/bin/linuxpatch
run_linuxpatch_script:
cmd.run:
- name: /tmp/install.sh
- env:
LP_KEY: {{ lp_key }}
- cwd: /tmp
- require:
- file: linuxpatch
- unless: test -f /opt/linuxpatch/bin/linuxpatch
cleanup_linuxpatch_script:
file.absent:
- name: /tmp/install.sh
- require:
- cmd: run_linuxpatch_script
linuxpatch_agent_service:
service.running:
- name: linuxpatch-agent
- enable: True
- require:
- cmd: run_linuxpatch_script
- file: linuxpatch