Skip to content

Instantly share code, notes, and snippets.

@yunano
yunano / consul-template.service
Created May 1, 2015 15:54
/etc/systemd/system/consul-template.service
[Unit]
Description=consul-template
Requires=network-online.target
After=network-online.target consul.service vault.service
[Service]
EnvironmentFile=-/etc/sysconfig/consul-template
Restart=on-failure
ExecStart=/usr/local/sbin/consul-template $OPTIONS -config=/etc/consul-template.d
@yunano
yunano / consul-template
Created May 1, 2015 15:53
/etc/init.d/consul-template for CentOS 6
#!/bin/sh
#
# consul-template - this script manages the consul-template
#
# chkconfig: 345 97 03
# processname: consul-template
### BEGIN INIT INFO
# Provides: consul-template
# Required-Start: $local_fs $network
@yunano
yunano / consul.service
Created May 1, 2015 15:52
/etc/systemd/system/consul.service
[Unit]
Description=consul agent
Requires=network-online.target
After=network-online.target
[Service]
EnvironmentFile=-/etc/sysconfig/consul
Environment=GOMAXPROCS=2
Restart=on-failure
ExecStart=/usr/local/sbin/consul agent $OPTIONS -config-dir=/etc/consul.d
@yunano
yunano / consul
Last active October 7, 2022 18:58
/etc/init.d/consul for CentOS 6
#!/bin/sh
#
# consul - this script manages the consul agent
#
# chkconfig: 345 95 05
# processname: consul
### BEGIN INIT INFO
# Provides: consul
# Required-Start: $local_fs $network
@yunano
yunano / vault.service
Last active August 17, 2023 08:51
/etc/systemd/system/vault.service
[Unit]
Description=vault server
Requires=network-online.target
After=network-online.target consul.service
[Service]
EnvironmentFile=-/etc/sysconfig/vault
Restart=on-failure
ExecStart=/usr/local/sbin/vault server $OPTIONS -config=/etc/vault.d
ExecStartPost=/bin/bash -c "for key in $KEYS; do /usr/local/sbin/vault unseal $CERT $key; done"
@yunano
yunano / vault
Last active February 23, 2023 02:48
/etc/init.d/vault for CentOS 6
#!/bin/sh
#
# vault - this script manages the vault server
#
# chkconfig: 345 96 04
# processname: vault
### BEGIN INIT INFO
# Provides: vault
# Required-Start: $local_fs $network
#!/usr/bin/env bash
# ansible_best_practice.sh ver.20150907
#
# Copyright (c) 2015 yunano
# This software is released under the MIT License.
# http://opensource.org/licenses/mit-license.php
export MARKER='%'
export FROM='.'
@yunano
yunano / 01_minimal.txt
Last active August 29, 2015 14:04
CentOS 7の9つのenvironment groupをyum groups infoした結果
Environment Group: 最小限のインストール
Environment-Id: minimal
説明: 基本的な機能です。
Mandatory Groups:
+core