Documentation ¶
Index ¶
- Constants
- Variables
- func RenderCommonInventory() (string, error)
- func RenderInventory(inventory Inventory) (string, error)
- func RenderPlaybook(playbooks []Playbook) (string, error)
- func RenderRunShell(cmds []RunCMD) (string, error)
- type AppArgs
- type CommonVars
- type Inventory
- type InventoryGroup
- type InventoryHost
- type Playbook
- type RunCMD
Constants ¶
View Source
const ( ANSIBLE_GROUP_K8S_MASTER = "k8s-master" ConfigsDir = "configs" AdditionalConfigsDir = "upload_configs" )
View Source
const ( ANSIBLE_INVENTORY_HOST_INIT_TPL = `` /* 216-byte string literal not displayed */ ANSIBLE_PLAYBOOK_TPL = `` /* 228-byte string literal not displayed */ ANSIBLE_CFG_TPL = `` /* 212-byte string literal not displayed */ RUN_SHELL_TPL = `` /* 162-byte string literal not displayed */ )
View Source
const ANSIBLE_INVENTORY_LABEL_INIT_TPL = `` /* 262-byte string literal not displayed */
View Source
const (
ANSIBLE_ROLE_HOST_INIT = "centos-init"
)
View Source
const NODE_LABEL_TPL = `
- hosts:
- node_label_mgmt
roles:
- node_label_mgmt
`
Variables ¶
View Source
var K8s_INVENTORY_TPL = `` /* 256-byte string literal not displayed */
Functions ¶
func RenderCommonInventory ¶
RenderCommonInventory 渲染并返回公共Inventory
func RenderInventory ¶
RenderInventory 渲染并返回yaml格式的inventory字符串
func RenderPlaybook ¶
RenderPlaybook 渲染并返回自定义Playbook
func RenderRunShell ¶
RenderRunShell 渲染并返回运行脚本字符串
Types ¶
type CommonVars ¶
type CommonVars struct {
BaseDir string
}
type Inventory ¶
type Inventory map[string]InventoryGroup
type InventoryGroup ¶
type InventoryGroup struct { Hosts map[string]InventoryHost `yaml:"hosts"` Vars map[string]interface{} `yaml:"vars"` }
type InventoryHost ¶
type InventoryHost map[string]interface{}
Click to show internal directories.
Click to hide internal directories.