- YAML 使用 2 空格+.yml后缀
- Jinja 变量前后需要使用空格 {{ var }}
- YAML 中引用变量时需要用双引号
- 环境变量全大写,其他变量全小写
- 所有变量前需要加上 role name 作为前缀,比如 nginx_xxx
- role 命名使用短横线
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
""" | |
License: MIT License | |
Copyright (c) 2023 Miel Donkers | |
Very simple HTTP server in python for logging requests | |
Usage:: | |
./server.py [<port>] | |
""" | |
from http.server import BaseHTTPRequestHandler, HTTPServer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import asyncio | |
import time | |
import socket | |
import argparse | |
import aiohttp | |
class MyConnector(aiohttp.TCPConnector): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cat > /etc/default/k3s <<EOF | |
GOGC=10 | |
EOF | |
chmod 600 /etc/default/k3s | |
K3S_CHANNEL=v1.26 | |
# --disable-helm-controller | |
curl -sfL https://get.k3s.io | \ |