forked from mantl/mantl-packaging
-
Notifications
You must be signed in to change notification settings - Fork 0
/
spec.yml
63 lines (54 loc) · 1.69 KB
/
spec.yml
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
---
name: consul-template
version: 0.13.0
license: MPLv2.0
iteration: 2
vendor: Hashicorp
url: https://github.com/hashicorp/consul-template
architecture: x86_64
description: Generic template rendering and notifications with Consul
type: rpm
depends:
- consul
- systemd
resources:
- url: https://releases.hashicorp.com/consul-template/{{.Version}}/consul-template_{{.Version}}_linux_amd64.zip
hash-type: sha256
hash: 6c3017dee5c75eebdecb83cd0a64ce04cd91dd8660aea432b479c1b807b06ed0
targets:
- src: "{{.BuildRoot}}/consul-template"
dest: /usr/bin/
- src: "{{.SpecRoot}}/plugins/"
dest: /usr/bin/
- src: "{{.SpecRoot}}/consul-template.service"
dest: /etc/systemd/system/consul-template.service
template: true
- src: "{{.SpecRoot}}/consul-template.sysconfig"
dest: /etc/sysconfig/consul-template
config: true
- src: "{{empty}}"
dest: /etc/consul-template/config.d
- src: "{{empty}}"
dest: /etc/consul-template/templates
- src: "{{empty}}"
dest: /etc/consul-template/scripts
- src: "{{empty}}"
dest: /var/run/consul-template
scripts:
build: |
unzip consul-template_{{.Version}}_linux_amd64.zip
after-install: |
systemctl enable /etc/systemd/system/consul-template.service
systemctl start consul-template.service
chown -R consul:consul /etc/consul-template
chown -R consul:consul /var/run/consul-template
before-remove: |
systemctl disable consul-template.service
after-upgrade: |
systemctl reload-daemon
systemctl restart consul-template.service
extra-args: |
--rpm-os linux
--rpm-auto-add-directories
--rpm-auto-add-exclude-directories /etc/systemd
--rpm-auto-add-exclude-directories /etc/systemd/system