added pki state
This commit is contained in:
parent
e753afd5e1
commit
b2ec2328a8
@ -3,6 +3,7 @@ pki:
|
||||
enabled: true
|
||||
install_dir: /usr/local/apps
|
||||
release_dir: /usr/local/apps/releases
|
||||
port: 11000
|
||||
mirror: https://git.paulbsd.com/paulbsd/pki/releases/download
|
||||
version: 0.1.0
|
||||
os: linux
|
||||
|
@ -1,3 +1,4 @@
|
||||
---
|
||||
include:
|
||||
- .install
|
||||
- .install
|
||||
- .service
|
||||
|
12
states/pki/pki.service.j2
Normal file
12
states/pki/pki.service.j2
Normal file
@ -0,0 +1,12 @@
|
||||
## {{ salt['pillar.get']('salt_managed', default='Salt Managed') }}
|
||||
{%- from "pki/map.jinja" import pki with context %}
|
||||
[Unit]
|
||||
Description=PKI Let's encrypt database
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart={{ pki.install_dir }}/pki/pki -configfile {{ pki.install_dir }}/config/common.ini -port {{ pki.port }}
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
14
states/pki/service.sls
Normal file
14
states/pki/service.sls
Normal file
@ -0,0 +1,14 @@
|
||||
---
|
||||
{%- from "pki/map.jinja" import pki with context %}
|
||||
pki-service-file:
|
||||
file.managed:
|
||||
- name: /etc/systemd/system/pki.service
|
||||
- source: salt://pki/pki.service.j2
|
||||
- user: root
|
||||
- group: root
|
||||
- template: jinja
|
||||
|
||||
pki-service:
|
||||
service.running:
|
||||
- name: pki
|
||||
- enable: true
|
Loading…
Reference in New Issue
Block a user