ansible

package
v0.0.0-...-f0fce53 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

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

func RenderCommonInventory() (string, error)

RenderCommonInventory 渲染并返回公共Inventory

func RenderInventory

func RenderInventory(inventory Inventory) (string, error)

RenderInventory 渲染并返回yaml格式的inventory字符串

func RenderPlaybook

func RenderPlaybook(playbooks []Playbook) (string, error)

RenderPlaybook 渲染并返回自定义Playbook

func RenderRunShell

func RenderRunShell(cmds []RunCMD) (string, error)

RenderRunShell 渲染并返回运行脚本字符串

Types

type AppArgs

type AppArgs map[string]interface{}

func NewAppArgs

func NewAppArgs() AppArgs

func (AppArgs) Set

func (args AppArgs) Set(key string, value interface{})

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{}

type Playbook

type Playbook struct {
	Hosts       []string
	Roles       []string
	IncludeVars []string
}

type RunCMD

type RunCMD struct {
	Command  string
	Reckless bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL